我使用了9 Patch generator online.但是当我创建资源时,它创建的HDPI资源为540x960像素。据我所知,HDPI资源通常是480x800像素。我如何正确使用资源。如何使用540x 960 HDPI 9用于480x800分辨率的补丁图像
- 有没有办法在HDPI中使用540x960像素的图像为480x800像素 也?
- 如何创建一个480x800像素的9补丁资源,以便将其用于HDPI 分辨率。还有其他工具吗?
使用的代码: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".Test" > <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/tutorial" /> </RelativeLayout>
,如果你看到了双方未填充的图像样本。我已验证图像是否正确修补。
你可能**误用了你的9个补丁。他们不必像屏幕一样大。他们的目的是**伸展**以适应他们的容器大小。 –
@DerGolem 我已经使用了下面的代码。 \t RelativeLayout> –
Pranavzz