I want to have two widgets: a spinner and checkBox were placed in one line. I read a lot here and enSO questions and answers and did this markup:
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:orientation="horizontal"> <Spinner android:id="@+id/spinner" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="10dp" android:layout_weight="0.1" android:entries="@array/filter_list" /> <CheckBox android:layout_width="match_parent" android:layout_weight="1" android:layout_height="match_parent" /> </LinearLayout> I had to change the android:layout_weight parameter from spinner from 1 to 0.1 because it turned out that it was on the floor of the screen, and I needed it to occupy about 85% of the entire selected width of the layout. But I'm not sure what I did right, and decided to ask here an opinion on my decision. I hope that I did not have a lot of mistakes.