1
Good night! I’m having trouble adjusting the text of a textview within a list, as the image shows, the end of the text is overwriting the button. How to fix? Picture how it’s getting.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="72dp">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/item_status"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="42dp"
android:id="@+id/linearLayout">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Medium Text"
android:id="@+id/item_name"
android:textSize="16dp"
android:maxLines="1"
android:ellipsize="end"
android:textColor="@android:color/black" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Text"
android:textSize="12dp"
android:textStyle="italic"
android:id="@+id/item_date" />
</LinearLayout>
<ImageView
android:layout_width="48dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:id="@+id/item_action"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_create_black_24dp"
android:alpha="0.26" />
</RelativeLayout>
Try putting
android:layout_toLeftOf="@+id/item_action"
in Linearlayout– ramaral
It worked. VLW!
– Thiago Porto