Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How make 10 inch tablet code compatible to 7 inch tablet in android

I have the source code for 10 inch tablet, how I make it suitable to 7 inch tablet without changing the layouts etc.

like image 920
Pinki Avatar asked Dec 06 '11 06:12

Pinki


1 Answers

You can not direct assume that 10 inch tablet Layout will work same as on 7 inch Tablet .You have to make some changes to work on both like following from android Developer Site.

For other cases in which you want to further customize your UI to differentiate between sizes such as 7” and 10” tablets, you can define additional smallest width layouts:

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)

Notice that the previous two sets of example resources use the "smallest width" qualifer, swdp, which specifies the smallest of the screen's two sides, regardless of the device's current orientation. Thus, using swdp is a simple way to specify the overall screen size available for your layout by ignoring the screen's orientation.

For Detail You can Refer Developer Site Link here

EDIT:

Please Refer this SO Link for Use of Drawable in all types Layout.Click here

Here is one more reference Guide for Understanding work with Multiple Screen In android,documents from Motorola Click here

like image 192
Herry Avatar answered Sep 20 '22 06:09

Herry