7
ActionBarのメニュー項目の間にセパレータを追加する方法は、Gmailアプリでも同様です。まあActionBarのメニュー項目の間にセパレータを追加する方法は?
ActionBarのメニュー項目の間にセパレータを追加する方法は、Gmailアプリでも同様です。まあActionBarのメニュー項目の間にセパレータを追加する方法は?
私はアクションバーのすべてのアイテムが表示される黒でframeLayoutを使用し、私自身のアクションバーを作成しようとしていました。 1dpの各項目にlayout_margin属性を設定して、両側に黒の区切り文字があるように見えるようにしました。それを大きくしたい場合は余白を増やすことができます。
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#000000">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageButton ....... />
<ImageButton ...... android:layout_marginLeft="1dp"/> <!-- this will be shown as a separator-->
</LinearLayout>
</FrameLayout>