无ABS的Android操作栏定制
需要设计像给定的图像,我如何可以自定义像下面给定的图像。提前感谢。我需要使用动作条无ABS的Android操作栏定制,android,android-actionbar,Android,Android Actionbar,需要设计像给定的图像,我如何可以自定义像下面给定的图像。提前感谢。我需要使用动作条 按照以下步骤定制您的操作栏 actionbar=getSupportActionBar(); actionbar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); actionbar.setCustomView(R.layout.custom_actionbar_items); 1.创建自己的布局 <?xml version="1.0" encod
按照以下步骤定制您的
操作栏
actionbar=getSupportActionBar();
actionbar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
actionbar.setCustomView(R.layout.custom_actionbar_items);
1.创建自己的布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button
android:id="@+id/topbar"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="#4169E1"
android:text="Title"
android:textAppearance="?android:attr/textAppearanceMediumInverse"
android:textColor="#ffffff"
android:textStyle="bold" />
<Button
android:id="@+id/Back"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="2dp"
android:background="@drawable/ic_action_back" />
</RelativeLayout>
希望能有所帮助。为什么不使用自己的布局并将其添加到
操作栏中呢?你能提供一些参考吗?请看这篇文章不,它对我没有帮助,谢谢!不管怎样,我还有一件事要做,那就是我需要在背面单独写一个单字。