On Sun, Apr 18, 2010 at 2:49 AM, hugh_wish <[email protected]> wrote:

> Does anyone know a way to set padding in dp programmatically?
>

float scale = context.getResources().getDisplayMetrics().density;
float size = sizeInPixes * scale;

On Sun, Apr 18, 2010 at 1:58 PM, BobG <[email protected]> wrote:

> Multiply by 1,2 or 4 based on hi,med or lo dpi?


Please don't.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to