0
我想提出一个自定义的操作栏类似以下内容:自定义操作栏 - 如何交换菜单和应用图标/标题?
我已经看到了问题How to align items in action bar to the left?和Positioning menu items to the left of the ActionBar in Honeycomb,但他们似乎并没有回答我的问题。
当我处于肖像模式时,我有一个分屏。菜单图标位于底部,顶部看起来像上图中的右侧。但是,在横向模式下,图标挤在应用程序图标的右侧。我希望他们在左侧显示。
这里是我的操作栏中当前XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/appIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@android:drawable/ic_app" />
<TextView
android:id="@+id/tvAppTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/appIcon"
android:text="@string/app_name" />
</RelativeLayout>