Aligned TextInputLayout text to the right - android

I have a EditText within a TextInputLayout. The EditText text floats to the right. I want the TextInputLayout to follow suit. Using android:gravity="right" on the EditText the text aligns to the right, but this doesn't work on TextInputLayout.
Any advice how to get the TextInputLayout text to float to the right?

This is not even possible when you have RTL support, and you select Arabic/Hebrew language.
The hint will float to left side instead of right side!

Related

How to give extra left padding to floating label in TextInputLayout android

My requirement is that I need to display the floating label on an Outlined TextInput Box a little to the right of the underlying EditText text value
Something like this-
See how the label Notes is a little to the right of Enter/View Notes. I tried to use hintTextAppearance attribute in the styles with paddingStart but the padding is just ignored.
Is there a way to customize the label's margin/padding to set the label a little towards right?

How to change left margin / padding text error on android TextInputLayout material.textfield

I need to remove error text left padding / margin on TextInputLayout material.textfield.
Any idea how to do this?
need like this error text with no padding
Default padding is same with TextInputEditText padding (has left padding):
I try extend IndicatorViewController but it final class
Well, I did say I am relatively new to this, I assumed that you would be able to modify the padding attributes within the theme. I did find another solution possibly but it brings both the floating label and the error text over. It would need to be setup dynamically but messing with
textInputLayout.setPadding(-40,0,0,0);
changed it so that it would line up closer to the left margin.

Underline text inside Editbox

As I enter text in editText it should automatically underline the text I entered. I need like as I continue to enter text in editText it draw like in background.
Can someone help me.
Use view with 1 dp of height and custom width with green background , inside framelayout over your editText, and handle custom_width same as you are handling image_width.
For underline effect in EditText you need to add this
//initialize edittext before
editText.setPaintFlags(Paint.UNDERLINE_TEXT_FLAG);

how can I set text between left and center in a TextView in Android, is there any way I can use margin for the text?

How can I put the texts in my white-colored textviews in Android in same location like those in my another pic? if I use android:gravity="left|center", it will be in the left-corner in the center, but I dont want it to be 100% left, what to do? is there any margin-type code for text in textView? Any tips would be appreciated, thanks
Use the android:paddingLeft attribute to add some space in your text view.

Settings background for EDITTEXT cutting words in Android

I am having a strange issue, the words are cutting inside EDITTEXT i have set an image as background. Plz help me... for example here ffsds, is being cut, I want it to shift to bit right so that it doesnt get cut.
Increase paddingLeft value of edit text.
...
android:paddingLeft="100dp"
...
in xml layout.
Increasing the left padding is the easy solution. But if this smiley image is always on the left of the edittext, you can set the image by using the attribute android:drawableLeft on the edittext.

Categories

Resources