I am trying to change the size of my SeekBar from the minimum to a
larger size so I can use the widget to select a value from a range of
values. I am able to change the size using the minimum width attribute
in XML:

     <SeekBar android:id="@+id/SeekBar01" android:minWidth="150dip"/>

but can not get the size to change programmatically:

     SeekBar valueSlider = new SeekBar(this);
     valueSlider.setMinimumWidth(150);

When I use the debugger for the programmatic approach it looks like
the mMinimumWidth variable from SeekBar (Red Square icon)  always
changes to 150, but the same variable from the View class (Blue
Triangle icon) does not change. However, they both change when I use
XML.

I would also appreciate any suggestions if there is a better way to
change the size. I would ideally like to have the width the maximum
width possible, but I'm not sure I can do that dynamically for
different screen sizes.

Thanks!

Frank Maker
fma...@handycodeworks.com

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

Reply via email to