Android的支持多种分辨率,多种布局文件夹多种、文件夹、布局、分辨率

由网友(你若安好,我便不扰)分享简介:现在,我支持多种分辨率,多种布局的文件夹。我使用的是Android开发工作室和我做了3个不同的文件夹。now I'm supporting multiple resolution with multiple layout folders.I'm using android development studio a...

现在,我支持多种分辨率,多种布局的文件夹。 我使用的是Android开发工作室和我做了3个不同的文件夹。

now I'm supporting multiple resolution with multiple layout folders. I'm using android development studio and I made 3 different folders.

layout
layout-large-port-1280x720
layout-normal-port-800x480 

和我测试了800×480和1280×720。 480x800的效果不错,但1280×720 800×480跟踪文件夹的DP和用户界面。

and I tested on 800x480 and 1280x720. 480x800 worked well, but 1280x720 follow 800x480 folder's dp and UI.

我不konw为什么这件事情发生在我身上,我不知道如何解决这个问题。 为什么它dosent工作以及我应该怎么办?

I dont konw why this thing happens to me and i don't know how to solve the problem. why it dosent work and what should I have to do?

推荐答案

对于不同的屏幕尺寸,下面是资源目录中,提供了不同的布局设计适用于不同的屏幕尺寸,不同的位图可绘于小型,中型的应用程序列表,高和超高密度的屏幕。

For Different screen size, The following is a list of resource directories in an application that provides different layout designs for different screen sizes and different bitmap drawables for small, medium, high, and extra high density screens.

 res/layout/my_layout.xml             // layout for normal screen size ("default")
 res/layout-small/my_layout.xml       // layout for small screen size
 res/layout-large/my_layout.xml       // layout for large screen size
 res/layout-xlarge/my_layout.xml      // layout for extra large screen size
 res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation

 res/drawable-mdpi/my_icon.png        // bitmap for medium density
 res/drawable-hdpi/my_icon.png        // bitmap for high density
 res/drawable-xhdpi/my_icon.png       // bitmap for extra high density

这就是code在清单支持所有的干粉吸入器。

Thats code in the Manifest supports all dpis.

   <supports-screens android:smallScreens="true" 
      android:normalScreens="true" 
      android:largeScreens="true"
      android:xlargeScreens="true"
      android:anyDensity="true" />
阅读全文

相关推荐

最新文章