2 android android-layout android-imageview
我无法在ImageView中正确缩放图像并使其居中.
向上扩展时,没有问题,但是当缩小时,图像不再显示居中,并且ImageView的边界是错误的,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:src="@drawable/stereomood_splash"
android:scaleType="fitCenter"
android:id="@+id/imageView1"
android:layout_width="100dip"
android:layout_height="200dip"></ImageView>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
这是一个错误,有没有人找到解决方法?
| 归档时间: |
|
| 查看次数: |
3123 次 |
| 最近记录: |