-1
<RelativeLayout
    android:layout_width="match_parent"
    android:layout_marginLeft="@dimen/profile_page_left_right_margin"
    android:layout_marginStart="@dimen/profile_page_left_right_margin"
    android:layout_marginTop="@dimen/profile_image_margin"
    android:padding="@dimen/profile_image_margin"
    android:paddingStart="@dimen/profile_image_margin"
    android:paddingEnd="@dimen/profile_image_margin"
    android:layout_below="@+id/toolBar"
    android:id="@+id/settings_general"
    android:visibility="gone"
    android:layout_height="wrap_content">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="@dimen/text_size_medium"
        android:layout_alignParentStart="true"
        android:layout_alignParentLeft="true"
        android:textColor="@color/black"
        android:id="@+id/general_setting_label"
        android:text="@string/general_settings_text"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:layout_marginRight="@dimen/profile_image_margin"
        android:layout_marginEnd="@dimen/profile_image_margin"
        android:textSize="@dimen/text_size_medium"
        android:id="@+id/general_nextIcon"/>

    <View
        android:layout_width="match_parent"
        android:layout_marginTop="@dimen/profile_image_margin"
        android:padding="@dimen/profile_page_left_right_margin"
        android:paddingStart="@dimen/profile_page_left_right_margin"
        android:paddingEnd="@dimen/profile_page_left_right_margin"
        android:layout_below="@+id/general_setting_label"
        android:background="@color/light_gray"
        android:layout_height="1dp"/>

</RelativeLayout>

There are two text view which I've added in relative layout which need to support rtl. But this is not working fine and icon is overlapped on general_setting_label. This code does not support the rtl for Persian (Farsi) language.

Prithniraj Nicyone
  • 5,021
  • 13
  • 52
  • 78
  • 1
    ... and WHERE do you explicitly set the text RTL direction? I can't see that. –  Jun 06 '16 at 12:03

1 Answers1

2

add below code to application tag in your menifests file :

android:supportsRtl="true"

and in your textView set layout_alignParentRight to true and width to wrap_content

Hope it works. Happy coding :)

Mithilesh Izardar
  • 2,117
  • 1
  • 13
  • 24