This is my code:

```
<EditText
        android:layout_width="@dimen/edittext_width"
        android:layout_height="@dimen/edittext_height"
        android:gravity="right|center_vertical"/>

```

I want the text go from right, so I add this code: `android:gravity="right"`.

The problem is that the cursor always remain at right.
I Attaching screen shots:

With gravity right - 
![enter image description here](https://i.stack.imgur.com/GjsXw.png)
![enter image description here](https://i.stack.imgur.com/aB87R.png)

Without gravity right - 
![enter image description here](https://i.stack.imgur.com/EdaxX.png)
![enter image description here](https://i.stack.imgur.com/2EDVy.png)

Actually I want it will be like the first image and the last image.

Any help?