In general, some buttons do not have a small screen, how to add a scroll? (if the screen is not enough - scroll down)

  • wrap items in scrollview - ermak0ff
  • I tried java.lang.RuntimeException: Unable to start activity ComponentInfo{MainActivity}: java.lang.IllegalStateException: ScrollView can host only one direct child
  • this container can have only one direct descendant, as an option to use linearlayout - ermak0ff

1 answer 1

  <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> //тулбар <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> //Ваши кнопки </LinearLayout> </ScrollView> </LinearLayout> 
  • Got it. It was necessary to do everything in LinerLayout, and I’ll turn it around in ScrollView - Vladimir Saleev
  • @ VladimirSaleev Glad to help, if my answer is correct, then tick the side of the answer :) - iFr0z