可以使用相对布局,而不是LinearLayout中
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="#00ff00">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:maxLines="1"
android:ellipsize="end" android:layout_centerInParent="true"/>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_centerVertical="true"/>
</RelativeLayout>
,或者您可以使用的FrameLayout
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="#00ff00">
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"/>
</FrameLayout>
是第3个按钮是不是显示? –
您是否尝试了'FrameLayout' ..后框与文本视图和前框与后退按钮.. –
nirav - 是的,我忘了让最右边的按钮在屏幕截图中可见。我更新了第一张截图以澄清。 – wufoo