親が右に配置されているボタンの左側に TextView を配置する RelativeLayout があります。そのため、TextView に表示するテキストが wrap_Content 以上に増えると、Button に重なってしまいます。そのため、超過したテキストを次の行に表示するソリューションが必要です。この問題を解決するのを手伝ってくれる人はいますか?
以下のレイアウトでは、TextView2 の Text が "1111111111111111111111" の場合、 TextView1 とオーバーラップします。それを防ぐ方法は?
私のレイアウトは以下の通りです:
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_margin="10dp"
android:scaleType="fitXY"
android:src="@drawable/icon" >
</ImageView>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/imageView1"
android:layout_margin="5dp"
android:text="TextView"
android:textSize="22dp"
android:layout_toRightOf="@id/imageView1"
>
</TextView>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:focusable="false"
android:text="Button"
android:layout_alignTop="@+id/imageView1"
>
</Button>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/button1"
android:text="TextView222"
android:textSize="22dp"
android:layout_margin="5dp"
android:layout_alignTop="@+id/imageView1"
android:ellipsize="end"
>
</TextView>
上記のレイアウトでは、TextView2 の Text が "1111111111111111111111" の場合、 TextView1 とオーバーラップします。それを防ぐ方法