Android Studio选择错误的布局 [英] Android studio selecting wrong layouts
问题描述
我是Android新手.我正在构建我的第一个应用程序.
I am new to Android. I am building my first application.
我一直试图使其支持多个屏幕.我已经看完了android中的开发人员部分,但是,我对这些事情不清楚.
I have been trying to make it support multiple screens. I have gone through the developers section in android, but, I am not clear at these things.
-
对于不同的可绘制文件夹应使用什么分辨率? (例如,一个hdpi屏幕可能具有500 * 600屏幕或1280 * 1920屏幕.)
What is the resolution, I should use for the different drawable folders? (for example an hdpi screen may have 500*600 screen or 1280*1920 screen.)
我一直在使用开发人员页面中提到的布局文件夹,例如小,普通和其他,但是android一直在为nexus 6p之类的屏幕选择正常的布局(我猜对于大屏应该是合适的) .
I have been using layout folders as mentioned in the developers page, like small, normal and the rest, but android keeps on selecting normal layouts for screens like nexus 6p(for which I am guessing large would be appropriate).
有什么办法可以使它看起来更好?
Is there any way I could make it look better??
推荐答案
您必须编写一次布局,但必须在app> res> values中为不同的不同分辨率定义尺寸dimens.xml.
You have to write layout once but have to define dimensions dimens.xml for different different resolutions in app>res>values.
这篇关于Android Studio选择错误的布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!