On Thu, Sep 9, 2010 at 2:42 PM, Bret Foreman <bret.fore...@gmail.com> wrote: > I want to add some checkboxes to a LinearLayout at runtime. The > orientation is vertical and I want the checkboxes to appear at the > bottom. I create each checkbox like this: > > CheckBox box = new CheckBox(this); > > Then I add the box to the current view like this: > > addContentView( box , params ); > > What should be the params to get the effect I want? So far, everything > I've tried ends up overlaying the new checkboxes on top of each other > and on top of the other items in the layout. I want everything stacked > in a column with the new checkboxes at the bottom.
I haven't tried addContentView(), and I don't know the semantics of it. Personally, I'd create a LinearLayout, add the CheckBox widgets to it, then call setContentView() on the LinearLayout. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- 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