How do you make a rubber marking so that the non-responsible elements are moved to the next line?
-
Is it possible to make a rubber marking in the annex so that the additives from the code are supplemented to the right on the left with the next line?
Make:
button1 button2 button3 button4 button5
button6 button7 button8 button9 button10
button11 button12
-
What you need is called FlowLayout.
Use one of the libraries: https://github.com/blazsolar/FlowLayout or https://github.com/ApmeM/android-flowlayout
In the case of the first liba, add the marking.
FlowLayout
and it's the right ring of your viewers, which should be transferred to another line if they don't fit in.<com.wefika.flowlayout.FlowLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="start|top">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Lorem ipsum" /> <!-- тут ещё много вьюх -->
</com.wefika.flowlayout.FlowLayout>
It'll be like this:
There's a container and a Google support library. https://habrahabr.ru/company/speakasap/blog/300908/ - much more functional than that.
FlowLayout