1
越来越
<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
,则android:gravity
选项正在工作,但不会与Imageview
。
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txt_loginpage"
android:background="@drawable/yellow" />