> Is it possible to create a horizontal LinearLayout where we specify
> how wide percentage-wise each element is? Something like:
>
> LinearLayout ll = new LinearLayout();
> ll.add(new TextView("a"));
> ll.setViewWidthAtIndex(0, 30);
> ll.add(new TextView("b"));
> ll.setViewWidthAtIIndex(1, 50);
> ll.add(new TextView("c"));
> ll.setViewWidthAtIndex(2, 20);
I don't know about through Java, but you should be able to achieve a
similar effect with android:layout_width (set them all to 0px) and
android:layout_weight (use your integer percentages here).
--
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---