我有一个水平方向的 LinearLayout 和 2 个 ImageView,我想让 ImagesView 在宽度上填充 50% 的屏幕,以便在不同尺寸的手机或平板电脑上工作。
像这样的东西:
+-------------+
|_____________|
| | |
| 50% | 50% |
| | |
|-------------|
| |
+-------------+
迄今为止最好的:
<?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:gravity="center"
android:orientation="horizontal" >
<ImageView
android:id="@+id/logo_c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_animado" />
<ImageView
android:id="@+id/logo_t"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/logo_animado2" />
</LinearLayout>