Adding a prefix to an EditText
Ali Muzaffar


Firsly, thank you for your post.

I think there is a mistake below;

setPadding((int) (textWidth + mOriginalLeftPadding),
getPaddingRight(), getPaddingTop(),

setPadding method’s constructor is like (left, top, right, end) so paddingRight and paddingTop should be switched.

Also, instead of using left and right, using start and end is important for rtl layouts.

Thank you.