I have an EditText in my application. I want to align the text in it to the right instead of the default left. I tried adding
android:layout_gravity="right"
You should use android:gravity="right"
. layout_gravity
is for the view (EditText) alignment against the container.