android - Is it possible to make a custom Gravity.Right method for Edittext? -


in app quote/poem writing app, user should able place text either on right or left side.

this can ofcourse archived medittext.setgravity(gravity.center | gravity.left);

but problem text placed left without space , dosn't good. want better explained image:

shall archived sort of custom gravity.right/left method if possible?

enter image description here

use android:paddingleft , android:paddingright add additional space on left , right edge of textview

enter image description here


Comments