Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
326 views
in Technique[技术] by (71.8m points)

css - Android - Multiple Screen support issue

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

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"
 />

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Android Development Tutorial

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...