1
如何在不调整ImageView大小的情况下调整ImageView中的图像大小?ImageView Android Image res resize
我需要的是这样的:
是相同的图像,但ImageView的大小不同
如何在不调整ImageView大小的情况下调整ImageView中的图像大小?ImageView Android Image res resize
我需要的是这样的:
是相同的图像,但ImageView的大小不同
我做了这样的事情:
<FrameLayout
android:layout_width="40dp"
android:layout_width="40dp"
android:background="@drawable/bkgd_circle"/>
<ImageView
android:layout_width="24dp"
android:layout_width="24dp"
android:layout_gravity="center"
android:src="@drawable/ic_person"/>
</FrameLayout>
使用“scaleType '属性 –
用户不同的可绘制图标,如drawable-xxxhdpi,drawable-xxhdpi,drawable-xhdpi,drawable-mdpi,drawable-hdpi。 –
使用此工具为android生成不同密度的图像或图标https://romannurik.github.io/AndroidAssetStudio/ – xFighter