Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无ABS的Android操作栏定制_Android_Android Actionbar - Fatal编程技术网

无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>

希望能有所帮助。

为什么不使用自己的布局并将其添加到
操作栏中呢?你能提供一些参考吗?请看这篇文章不,它对我没有帮助,谢谢!不管怎样,我还有一件事要做,那就是我需要在背面单独写一个单字。