<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight=".35" >
<ImageView
android:id="@+id/txt_loginpage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/yellow" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight=".65" >
<Button
android:id="@+id/edtCardnum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/request" />
</LinearLayout>
我无法使用 获得该android:gravity
选项Imageview
,但我可以使用 获得它Textview
。
我的代码有什么问题吗?
如果我将其更改为Textview
thenandroid:gravity
选项正在工作,但不适用于Imageview
.
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txt_loginpage"
android:background="@drawable/yellow" />