I'm trying to create a layout programmatically with long SeekBar so I
can adjust the values of a variable. I can change the width in XML
using:

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

However when I try to do the same programmatically:

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

I only get the minimum sized seekbar. I checked the debugger and the
mMinWidth variable with a blue triangle, which I assume comes from the
View class, is set to the minimum size. The mMinWidth variable for the
SeekBar class (red square) is set to the desired minimum width.
However when I use XML, both are set the desired minimum width.

Any idea how I can do that same programmatically as with XML? Another
way to go would be if I could just say "Make the SeekBar as wide as
possible in this layout." I should mentioned that I have two TextView,
one on each side of the SeekBar as well.

Thanks for your help,

Frank Maker
[email protected]

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