我试图创建一个包含子Framelayout的Framelayout,但是我无法将子Framelayout定位到父Framelayout的右侧。
我尝试使用android:foregroundGravity="right"和android:layout_weight="1"。
我尝试使用android:foregroundGravity="right"和android:layout_weight="1"。
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/listView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_weight="1">
<com.example.ListViewActivity
android:id="@+id/list_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</com.example.ListViewActivity>
<FrameLayout
android:id="@+id/indexRight"
android:layout_width="36dp"
android:layout_height="fill_parent"
android:layout_gravity="left"
android:background="@color/white"
android:orientation="vertical" >
</FrameLayout>
</FrameLayout>
屏幕截图:
如上图所示,我想将白色的FrameLayout移动到右侧。
谢谢。