我的活动中有8个imgbutton。我想让它们为不同的屏幕调整大小,但它们保持不变。我正在使用mipmaps。
Main.xml:
.
<ImageButton
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@mipmap/adduser2"
android:layout_marginTop="33dp"
android:background="#ffffffff"
android:layout_margin="33dp"
android:scaleType="fitXY"/>
android:layout_marginTop="33dp"
android:background="#ffffffff"
android:layout_margin="33dp"
/>清单:
<supports-screens
android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
/>发布于 2015-07-07 05:40:59
This Link应该会给你答案,你需要创建不同的镜像,并根据它们的pixel densities将它们放在各自的文件夹中。
https://stackoverflow.com/questions/31256019
复制相似问题