机器人 - 多屏支持问题 [英] Android - Multiple Screen support issue
问题描述
我设计的Android应用程序将支持平板电脑,但我面对关于多屏支持一个小问题。
I am designing an Android Application that will support Tablets, but i am facing a small issue regarding the Multiple Screen Support.
谁能告诉我,下面的布局设计。
Can anyone tell me, for the below layout design
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
我们指定低于code清单文件。
we specify the below code in Manifest file.
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true"
/>
现在会在 code保持不变,如果布局如下;
Now will the code remains the same if the layouts are as below;
res/layout/main_activity.xml # For handsets (smaller than 600dp available width)
res/layout-sw600dp/main_activity.xml # For 7" tablets (600dp wide and bigger)
res/layout-sw720dp/main_activity.xml # For 10" tablets (720dp wide and bigger)
它是强制性的定义 清单文件?如果我不定义是什么。请帮我。
Is it compulsory to define in Manifest file?? What if I don't define. Please help me.
推荐答案
Android的开发教程
Android Development Tutorial
Android的权力数百设备类型有几种不同的屏幕尺寸,从小型的手机到大电视机。因此,重要的是你设计你的应用程序与所有的屏幕尺寸兼容,所以它提供给尽可能多的用户可能很重要。 但是与不同设备类型兼容是不够的。每个屏幕的大小提供不同的可能性,并为用户交互的挑战,这样才能真正满足和IM preSS你的用户,你的应用程序必须超越仅仅是支持多屏幕:它必须优化每个屏幕配置的用户体验。 - 多见于:<一href="http://fireandroids.blogspot.in/2014/01/developing-different-screen-sizes.html#sthash.tWtbmwLc.dpuf" rel="nofollow">http://fireandroids.blogspot.in/2014/01/developing-different-screen-sizes.html#sthash.tWtbmwLc.dpuf
Android powers hundreds of device types with several different screen sizes, ranging from small phones to large TV sets. Therefore, it’s important that you design your application to be compatible with all screen sizes so it’s available to as many users as possible. But being compatible with different device types is not enough. Each screen size offers different possibilities and challenges for user interaction, so in order to truly satisfy and impress your users, your application must go beyond merely supporting multiple screens: it must optimize the user experience for each screen configuration. - See more at: http://fireandroids.blogspot.in/2014/01/developing-different-screen-sizes.html#sthash.tWtbmwLc.dpuf
这篇关于机器人 - 多屏支持问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!