让ImageView全部适应ScrollView
16lz
2021-12-04
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:fillViewport="true">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:src="@drawable/huge"
android:scaleType="fitCenter" android:layout_weight="1" />
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!-- Insert your content here -->
</LinearLayout>
</LinearLayout>
</ScrollView>
android:fillViewport="true" 必须设置的啊
更多相关文章
- Android设置支持多种分辨率
- Android(安卓)WebView相关属性
- android设置属性
- Android(安卓)Desigin Library
- 基于Android(安卓)P 背光流程
- android:windowSoftInputMode属性使用
- android笔记
- 设置Android(安卓)app背景图片(Android(安卓)studio)
- 让Android支持透明状态栏