Have you read the similar layout example at http://developer.android.com/intl/de/resources/articles/layout-tricks-efficiency.html ?
- Greg On Apr 11, 8:39 am, "Teo [GD API Guru]" <teomina...@gmail.com> wrote: > Hi, > > you probably heard similar problems before but i can't figure out how > to do this programatically. I have a vertical layout with FILL_PARENT > on both dimensions. In it i have multiple horizontal layouts with > FILL_PARENT width and WRAP_CONTENT height. In each of these horizontal > layouts i want to put a checkbox on the left and an ImageButton on the > right. The problem is i can't stop the checkbox from growing to the > point of pushing the ImageButton out of view.. (same thing happens > when the checkbox has FILL_PARENT or WRAP_CONTENT widths). > > For individual stuff i managed to do it in the XML layout very easily: > > <...something... android:layout_width="fill_parent" > android:layout_height="wrap_content" > android:layout_weight="1" /> > > <...something... android:layout_width="wrap_content" > android:layout_height="wrap_content" /> > > Same thing doesn't work programatically though, and i've tried other > gravity, weight, layout combinations.. Can someone who tried this tell > me how they did it, or how it should be done? > > Thanks, > Teo -- 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 To unsubscribe, reply using "remove me" as the subject.