0

I want to write from right hand side to left hand side in textview.So please tell me how should i do that.

            <TextView 
            android:id="@+id/dl_discount"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/dl_price"
            android:layout_marginLeft="14dp"
            android:layout_marginStart="14dp"
            android:textColor="@color/red"
            android:layout_toEndOf="@+id/dl_price"
            android:layout_toRightOf="@+id/dl_price"
            android:text="1" />
Arthur Attout
  • 2,701
  • 2
  • 26
  • 49
Egarage e
  • 21
  • 6
  • Please check out this question https://stackoverflow.com/questions/10964488/how-to-make-the-text-direction-from-right-to-left – Emir Aug 05 '19 at 18:33
  • i tried it many times that had been descripted in link provided by you...but its not working – Egarage e Aug 05 '19 at 18:44
  • Possible duplicate of [How to make the text direction from right to left](https://stackoverflow.com/questions/10964488/how-to-make-the-text-direction-from-right-to-left) – Arthur Attout Aug 05 '19 at 18:47

1 Answers1

1

Simply set android:textDirection to rtl

Tamir Abutbul
  • 7,301
  • 7
  • 25
  • 53
Amirhosein
  • 4,266
  • 4
  • 22
  • 35
  • @Egaragee did you accept an answer that is not working to you ? If so, please discard the accepted answer and provide information on what's happening instead. – Arthur Attout Aug 05 '19 at 20:35