1
I have two Texts views that will appear in a Listview and I want one to be aligned above and one below, but it’s not working the way I’m doing.
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView_lista_notify"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_margin="4dp"
android:src="@drawable/ic_menu_gallery" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/texto_notificacao_list"
android:layout_marginTop="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:layout_gravity="top"
android:text="TextView" />
<TextView
android:id="@+id/texto_hora_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:layout_gravity="bottom"
android:text="TextView" />
</LinearLayout>
</LinearLayout>
Try switching from Linearlayour to Relativelayout
– Leonardo Dias
But I am using LINEAR layout in the other listview and the property Gravity is working, not that not , but vlw
– Demetrius
Then try
android:layout_alignParentBottom="true"
– Leonardo Dias
Look at this reply.
– ramaral