Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/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
Android:如何创建导航栏 我看到一些应用程序,屏幕上有一个略微半透明的黑条,上面有按钮,中间有菜单栏。我想知道如何创造这样的东西_Android - Fatal编程技术网

Android:如何创建导航栏 我看到一些应用程序,屏幕上有一个略微半透明的黑条,上面有按钮,中间有菜单栏。我想知道如何创造这样的东西

Android:如何创建导航栏 我看到一些应用程序,屏幕上有一个略微半透明的黑条,上面有按钮,中间有菜单栏。我想知道如何创造这样的东西,android,Android,您可以这样做: <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#AAFFFFFF"> <ImageButton android:src="@drawable/left_arrow" android:layout_width="wrap_content"

您可以这样做:

<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#AAFFFFFF">

    <ImageButton android:src="@drawable/left_arrow"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"/>

    <TextView android:text="@string/your_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentCenter="true"/>

    <ImageButton android:src="@drawable/right_arrow"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"/>
</RelativeLayout>

注意我选择的
android:background
颜色。这可能是错误的