什么叫读书?按照华罗庚的由薄读到厚就叫读书
1、我们在阅读下面一段代码
<ImageView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_weight="1"
android:src="@drawable/top" />
不知道android:scaleType="centerCrop"什么意思,
这时我们需要是把他进行还原来思考,我称之为还原法
2、 去掉一些陌生的属性
android:scaleType="centerCrop"
android:layout_weight="1"
代码如下
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/top" />
看看图片的样子
3、然后在加上某一个属性代码如下:
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/top" />
4、其次在改变某一个属性代码如下:
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@drawable/top" />
/>
看输出效果
5、再加上一些属性看看变化
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_weight="1"
android:src="@drawable/top" />
6、把上面的变化结合起来我们可以把它这一属性得到理解,一定要按照上面步骤去做才能理解,即便我说太清楚你也不会明白