I have a TextView
in RelativeLayout
in which I am setting the text from a string and that string contains the text more than 2 lines. But I want to set the Text into two lines. All is working but the problem is the Text in two lines is not aligned well.
Here is how it looks:
This is the text of first line which contains a dummy text
As you can see I have set left margin of 5 then it only applied on first line but not on the second one. So what is the problem and how can I solve it?
<TextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/image"
android:maxLines="2"
android:layout_marginLeft="10dp"
android:textSize="20sp"
android:textColor="#000000"
android:textAppearance="?android:attr/textAppearanceMedium">
</TextView>