Мне нужно иметь 3 текста в макете. textView
в центре красного цвета, а остальные 2 - черные. поэтому я добавил его к relativelayout
и установите layout
в textView2 справа от textView1 и textView3 справа от textView2андроид, упорядочивающий текстовый вид в макете
Но когда текст в представлении третьего текста больше, он должен прийти TextView один , Я понял это.
теперь, что я должен сделать, чтобы получить Somthing как это?
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/rel_lay"
android:background="#DFDFDF"
android:padding="2dip" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:text="TextView"
android:textColor="#000000" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/textView1"
android:text="TextView"
android:textColor="#FF0000" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="false"
android:layout_toRightOf="@+id/textView2"
android:text="TextView when the third text is longer"
android:textColor="#000000" />
</RelativeLayout>
это относительное макет с 3 TextView.
попробовать с весом – Richa
сообщения ур коды XML !!!! –
отправить свой код xml – Pragnani