it's wird, it's work for me,so it's a problem for you if you set the orientation to vertical?
On Jun 25, 9:02 pm, "Mr.No" <[email protected]> wrote: > dont work, only if i setOrientation to vertical. > > On 25 Jun., 17:21, JdbcDroid <[email protected]> wrote: > > > try to use l1.setOrientation(...) just before > > l1.addView(...) > > > On Jun 25, 4:42 pm, "Mr.No" <[email protected]> wrote: > > > > Ive tried it with layoutparams its the same. > > > the default layoutarams will be assigned to the layout. > > > > On 25 Jun., 16:26, Peli <[email protected]> wrote: > > > > > You have not set any layout > > > > parameters.http://developer.android.com/reference/android/widget/LinearLayout.La... > > > > > l2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, > > > > LayoutParams.WRAP_CONTENT)); > > > > > Peliwww.openintents.org > > > > > On Jun 25, 3:28 pm, "Mr.No" <[email protected]> wrote: > > > > > > Hi folks, > > > > > ive a little problem: > > > > > > Why is the following code causing an exception? > > > > > The Code throws a "mBaselineAlignedChildIndex of LinearLayout set to > > > > > an index that is out of bounds" exception. > > > > > > public void onCreate(Bundle savedInstanceState) { > > > > > super.onCreate(savedInstanceState); > > > > > setContentView(R.layout.main); > > > > > > LinearLayout l1 = new LinearLayout(this); > > > > > LinearLayout l2 = new LinearLayout(this); > > > > > l1.addView(l2); > > > > > this.setContentView(l1); > > > > > > } > > > > > > If l2 is dont added to l1 than it works. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

