Gustavo speaks,
When you use RelativeLayout, you must specify which item is over which, for example:
<TextView
android:id="@+id/name_dias"
android:text="Leonardo Dias"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/name_rotondo"
android:text="Gustavo Rotondo"
android:layout_below="@id/name_dias"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
I have two TextViews, and Gustado Rotondo will be under Leonardo Dias.
And so you control, there are other options too:
- android: layout_toRightOf="@ id / name_dias" (left)
- android: layout_toLeftOf="@ id / name_dias" (right)
- android: layout_above="@ id / name_days" (above)
And you can also use LinearLayout, when you define it, you must specify a vertical or horizontal orientation, and the items themselves will fit together:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
So, all of the items fall under each other.
I hope I have been able to explain it in the best way.
Hugs.