我只在一种布局中创建了我的应用程序。但现在我需要支持高分辨率屏幕。我有一个 ListView
从 JSON
获取图像。
android:layout_width="fill_parent"
android:layout_height="174dp"
图像在 4 英寸设备上显示大小合适,但在平板电脑上图像从顶部和底部被裁剪。所以我加了
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ellidokuz.com"
android:versionCode="1"
android:versionName="1.0" >
<supports-screens
android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true"
android:xlargeScreens="true"
/>
此代码显示。然后将list_v.xml
复制到drawable-xhdi
和drawable-xxhdi
。
然后我改变了
android:layout_width="fill_parent"
android:layout_height="174dp"
到
android:layout_width="fill_parent"
android:layout_height="350dp"
但我的应用程序仍在布局文件夹中运行 xml 文件。如何将其设置为在 drawable-xxhdpi
文件夹中运行 xml 文件?
最佳答案
只需简单地将您的 xml 复制并粘贴到不同的布局文件夹中
关于Android 多屏支持不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23196569/