これが私のアクションバーの外観です。actionbarsherlock を使用してこれを実装しました。戻るボタンとセパレーターをカスタマイズする方法
1087 次
2 に答える
1
CustomViews を使用してアクションバーをカスタマイズできます。例えば:
アクションバーのレイアウト:
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
そして、このレイアウトをカスタム ビューとして設定する必要があります。
View actionbarView = getLayoutInflater().inflate(R.layout.actionbar, null);
getSupportActionBar().setCustomView(actionbarView);
Android では標準であるため、戻るボタンの外観をカスタマイズすることはお勧めしません。
于 2013-07-06T12:00:47.587 に答える