The difference in scaledDensity is because the font size is different 
across devices.
http://developer.android.com/reference/android/util/DisplayMetrics.html#scaledDensity

Regarding the bad layout, post the xml/code relevant to the Published/Draft 
buttons 

On Thursday, February 20, 2014 2:35:03 PM UTC+2, Ankita wrote:
>
> The further exploration revealed that the scaledDensity is different for 
> both the devices. For HTC, it is 1.275 while for Samsung it is 1.5 while 
> density is 1.5 for both.
> I found this using getResources().getDisplayMetrics().scaledDensity and 
> getResources().getDisplayMetrics().density respectively.
>
> Now, can someone help me to resolve this issue?
>
> On Thursday, February 20, 2014 5:30:47 PM UTC+5:30, Ankita wrote:
>>
>> Hi All,
>>
>> I have run into this strange issue. The two devices HTC Desire X and 
>> Samsung Galaxy S Duos 2 GT-7582 have exactly same specs in terms of screen 
>> sizes. However, one has got layouts coming up as close to shared .psd files 
>> (Samsung) as possible but, another (HTC) shows lot of differences like 
>> smaller font sizes but, larger padding. I tried different std. layout 
>> folders (small, large, xlarge) but, not to much help. I have attached 
>> screenshots for reference. 
>>
>> Moreover, I tried "getResources().getDisplayMetrics().density" also which 
>> gave the same value 1.5 for both of them but, one shows the screenshots as 
>> expected as per the .psd file (Samsung) while another is far from the 
>> shared .psd files (HTC)
>> Now, I am trying to know that even with the same spec(screen size and 
>> resolution) for both the devices, one device is showing expected layout as 
>> designed in eclipse while other is showing smaller font sizes, different 
>> padding etc. One question is why it is happening in first place despite 
>> using dp and sp. Secondly, what to do now? I mean how to know which layout 
>> folder could help as hit and try doesn't seem to work so far. Although I 
>> intend to invest more time on it today.
>>
>> It would be great if somebody could throw some light on the issue.
>>
>> HTC Desire X (Display): 
>> http://www.htc.com/www/smartphones/htc-desire-x/#/ 
>>
>> Samsung Galaxy S Duos 2 (Display): 
>> http://www.samsung.com/levant/consumer/mobile-phones/mobile-phones/duos/GT-S7582ZKAMID
>> Thanks!
>>
>>
>>
>>
>> <http://www.samsung.com/levant/consumer/mobile-phones/mobile-phones/duos/GT-S7582ZKAMID>
>>
>>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to