Try using a Javascript library (such as jQuery) to compute pixels that are 
understood internally by the WebView rather than trying to convert 
something from Android's reckoning of pixels.  You could have it trigger on 
window resize to compute and set the size that corresponds to the relative 
amount of space you want.

Doug

On Friday, January 24, 2014 3:18:04 PM UTC-8, Cayce wrote:
>
> I have an Android app that delivers live text content in various div 
> blocks that have to maintain a relationship with each other. The obvious 
> problem is that using pixel values in attributes renders differently in 
> different devices, such as the Galaxy S4 and the Nexus 7, which both pull 
> from the xxhdpi database, but have different viewport specs. So the best 
> method I've found is to apply percentages instead of pixel values. This 
> works fine on width attributes, but height attributes just collapse.
>
> Is there a known workaround for getting height by % to render in the 
> Android app environment?
>
> Thanks much.
>
> Cayce
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to