【发布时间】:2021-08-18 08:02:29
【问题描述】:
我有一个矢量可绘制图像,其大小为24dp。我想在更大的Imageview 中显示图像,但将可绘制对象保持在中心的大小为24dp。
以下使drawable更大:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="200dp"
android:src="@drawable/the_image_drawable"
/>
</LinearLayout>
我做错了什么?
【问题讨论】:
标签: android imageview android-imageview