如何设置Android的布局,支持所有的屏幕尺寸?有的、布局、如何设置、屏幕尺寸

2023-09-12 06:29:00 作者:两腿间犯罪的深渊

正在开发在Android version2.2程序。我已在支持多个屏幕尺寸,但仍是一​​头雾水看了很多文件。我设计了一个布局文件,支持大型和标准屏幕,当我与小屏幕尝一尝它不调整布局以适应屏幕。我用这个code在清单也。

am developing a programme on android version2.2. I have read many documentation on supporting multiple screen sizes but still confused. i designed a layout file, that supports for large and normal screens, when am trying it with small screen it is not adjusting the layout to fit the screen. i used this code in the manifest also.

<supports-screens 
        android:resizeable="true"
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:anyDensity="true"
        />

对于小屏幕上的图像是这里 如何设置屏幕与小屏幕兼容?地方我发现通过使用文件夹布局小,但如果我用这个,项目规模越来越大,我不希望出现这种情况,因此任何人可以建议我做这件事的最佳方法。

the image for the small screen is here. How can i set the screen that compatible with small screen? somewhere i found by using the folder "layout-small" but if i use this, the project size is increasing, i don't want that, so can any one suggest me the best way to do this.

在此先感谢。

推荐答案

请通过下面的链接。这些可以帮助你:

Please go through the following links. These might help you:

支持不同的屏幕尺寸

支持多画面

支持不同密度

支持平板电脑和手机

AFAIK,支持所有屏幕的唯一方法就是通过做该文件夹分叉。每个XML文件上升到几千字节。因此,大小不应该是太大的问题的本身。

AFAIK, the only way to support all screens is by doing that folder bifurcation. Every XML file goes up to a few kilo bytes. So, size shouldn't be too much of an issue as such.