Hi All,

We have developed an application that has some UI with default Android 
Progress Bar, some Music Icons like play/pause,Selectors and text views.
Input:  we have a layout specified by designer where all values are in 
pixels and the original layout is specified for 1080. also the font sizes 
are specified in "sp"
also the designer has provided drawables for 1080. we will not be receiving 
new set of drawables for 720p. 
we have some icons, selectors etc in drawables. only selectors are 9 patch 
images.

We need to support both 720p and 1080 resolution as we want this 
application in Google Tv Apps.
The given layouts works fine for 1080 resolution but when we change the 
resolution to 720p, all the UI gets disturbed.
*
What is the correct approach to support 720p and 1080 resolution?

*We have tried the following options - 

1. Option 1 
------------------------------
     We have created the following two folders - 

    a) layout- Here the xml files have dimensions specified in "dp", with a 
factor of 0.5 with the original pixel value.
         px = dp  *  (dpi /160) . use "dpi" for 1080 = 360 
         since original layout from designer has values in pixels, we 
convert them to dp using above formula
 
         dp = px / ( dpi / 160 ))

         Font sizes are specified in "sp" 

    b) drawable-xhdpi - contains resources given by designer for 1080
    
    Issue: we observe that there is some shift in text view margins, and 
font size got reduced. 

2. Option 2 
------------------------------
we tried by creating a layout for "hdpi" seperately with same set of 
drawables. i.e
a) layout-hdpi - here the xml files use a factor of 1.5 on original pixel 
values specified by designer, to get dp values
b) drawable-hdpi : same set of original resources are copied here

Issue: the layout gets stretched 


3. Option 3
-------------------------------------
we tried adding layout-tvdpi and drawable-tvdpi. layout-tvdpi has xml files 
which use a factor of 1.33 on original pixel values
we observed that Google TV did not consider tvdpi at all !!

And, finally we tried with changing all the drawables to 9-patch images. It 
helped a little though the issue with text views, as mentioned in the 
Option 1, remained though.

Please help. ASAP.

Regards,
Revathi KJ



    
             

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to