Resize parent LinearLayout when adding Buttons Programatically?

Try putting the linearlayout inside a horiztonalscrollview. That should provide the scrollbar once the button exceeds the screen width.

That was all I needed to do. Using a horizontalscrollview instead of just the scrollview. Now it works!

– homtg yesterday.

If you don't trying HorizontalScrollView, I think that must help.

Try HorizontalScrollView and add Buttons to it . This will scroll automatically whenever needed . For more help share complete layout code.

LinearLayout provide only "linear" positioning of views ;) I mean you can do like this: btn1btn2btn3btn4 or like this: btn1 btn2 btn3 btn4 Difference between two variants is in android:orientation param. For more complicated views you should use TableLayout or RelativeLayout. If you want to do scrollable variant of linear layout creta this structure: and add buttons to linear layout like you do it now.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions