ImageViewがTextViewの右に揃えられています。テキストが長すぎると、イメージのサイズが変更されます...イメージのサイズを同じにして、TextViewを新しい行に挿入するにはどうすればよいですか?RelativeLayout内でImageViewを修正できません
ここではXMLです:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="@color/md_white_1000"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:id="@+id/btn_container_1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@color/blue"
android:layout_weight=".50"
android:layout_marginRight="1dp">
<Button
android:id="@+id/btn_1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0"
android:onClick="searchClicked"/>
<TextView
android:id="@+id/btn_text_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@color/md_white_1000"
android:paddingEnd="10dp"
android:paddingRight="10dp"
android:text="BTN1" />
<ImageView
android:id="@+id/btn_image_1"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/btn_text_1"
android:layout_toRightOf="@id/btn_text_1"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:src="@drawable/draw" />
</RelativeLayout>
</LinearLayout>
tryroid:ellipsize = "end" in Textviewタグ – Onkar