关于布局文件layout_gravity的问题
我想在屏幕底部放3个imagebutton,做成左中右的布局,但是在tablerow中layout_gravity不起作用,
下面布局文件
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#606060" android:orientation="vertical" > <RelativeLayout android:id="@+id/head" android:layout_width="fill_parent" android:layout_height="wrap_content" > <ImageView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:adjustViewBounds="true" android:contentDescription="@string/title" android:src="@drawable/play" /> <ImageButton android:id="@+id/playOrPause" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/music" android:adjustViewBounds="true" android:layout_gravity="right" android:layout_toRightOf="@id/title" android:src="@drawable/play" /> </RelativeLayout> <FrameLayout android:id="@+id/middlecontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" > </FrameLayout> <TableLayout android:id="@+id/flip" android:layout_width="fill_parent" android:layout_height="wrap_content" > <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <ImageButton android:id="@+id/left" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/left" android:adjustViewBounds="true" android:contentDescription="@string/leftye" /> <ImageButton android:id="@+id/goContent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:adjustViewBounds="true" android:layout_gravity="center" android:contentDescription="@string/middle" /> <ImageButton android:id="@+id/right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:adjustViewBounds="true" android:src="@drawable/right" android:layout_gravity="right" android:contentDescription="@string/rightye" /> </TableRow> </TableLayout></LinearLayout>