Android Tutorial #19: Wrapping items up inside a scroll view / linear layout combo.

Опубликовано: 22 Июль 2026
на канале: clientuser.net
20,373
73

Source Code:   / clientuser_net  

If you've ever wanted to create a scrollable menu of buttons, then you are about to find out how. I show you how to use the android scrollview, what items you must feed it and the relationship between the scrollview items and the android screen area and layout xml file.

We wrap our buttons in a linear layout, then wrap the scroll view around that - quite simple, but you have to take care.

I also briefly compare linear layouts with the relative layout of the main activity class xml layout file.

If you really wanted to, you could change the whole of the main activity layout to linear, if you changed the entry in the xml declaration from RelativeLayout to Linear