Java Android-ImageView适用于TableLayout
如何确保我的Imageview适合TableLayout?我的不能像这件一样合身 我的是这样的 我的代码Java Android-ImageView适用于TableLayout,java,android,xml,Java,Android,Xml,如何确保我的Imageview适合TableLayout?我的不能像这件一样合身 我的是这样的 我的代码 <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_paren
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:scrollbars="none" >
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/kelas_mengaji" />
</LinearLayout>
</TableRow>
</TableLayout>
</ScrollView>
将其添加到ImageView
android:adjustViewBounds="true"
根据你的密码,我得到了你想要的答案