Ah well, is there any better and new way of setting pixel sizes at
least for a view? For example, my two styles had different image
widths:

   // style1:
   layout_width="25dip"

   // style2:
   layout_width="50dip"

Doing something like this:

   myView.setLayoutParams(new LinearLayout.LayoutParams(50, 50));

would not set the sizes in dip, scaled for the current device display
specifics. I could grab the device density and scale myself, but are
there any other better ways of doing this? Like if I could read the
values from my styles in styles.xml and let it rescale for me? I doubt
it, but just wondering if there's some way to utilize the dip system,

Thanks



On Sep 3, 2:51 pm, Mark Murphy <[email protected]> wrote:
> On Fri, Sep 3, 2010 at 5:42 PM, Mark Wyszomierski <[email protected]> wrote:
> > Is there a way to set a style for a View at runtime?
>
> Not that I am aware of, sorry.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

-- 
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