Answer by CoolMind for TextInputLayout :How to give padding or margin to hint?
Thanks @Erkan for app:boxCollapsedPaddingTop (if background is set in TextInputLayout).<com.google.android.material.textfield.TextInputLayout...
View ArticleAnswer by Isaque Beirith for TextInputLayout :How to give padding or margin...
Try to use paddingStart instead of padding left or right. It worked for me.android:paddingStart="8dp"
View ArticleAnswer by Hassan Zulfiqar for TextInputLayout :How to give padding or margin...
Working Solution:You have to give custom height to TextInputEditText and make a custom drawable then you will get your solution, HOPE IT WILL WORKS 100%1st...
View ArticleAnswer by Gora for TextInputLayout :How to give padding or margin to hint?
You can try this solution and editTextStyle in TextInputLayout style only. For example:<com.google.android.material.textfield.TextInputLayout ... android:layout_width="@dimen/element_width"...
View ArticleAnswer by Erkan for TextInputLayout :How to give padding or margin to hint?
If you want to set the android:hint padding to 0 on focus, add app:boxCollapsedPaddingTop="0dp" to your TextInputLayout.
View ArticleAnswer by Ramachandra Reddy Avula for TextInputLayout :How to give padding or...
You can use startIconDrawable to TextInputLayout and make sure you set some dummy transparant icon(icon width would be the padding start value). so that you will get padding from start.Note: this is a...
View ArticleAnswer by Andrei K for TextInputLayout :How to give padding or margin to hint?
After many attempts i found one more solution (material version 1.2.1):this is layout sample:<com.google.android.material.textfield.TextInputLayout android:id="@+id/textInputLayout"...
View ArticleAnswer by Ketan Ramani for TextInputLayout :How to give padding or margin to...
layout xml<com.google.android.material.textfield.TextInputLayout style="@style/TextInputLayout" android:layout_marginTop="10dp" android:gravity="center"...
View ArticleAnswer by Abhay Pratap for TextInputLayout :How to give padding or margin to...
just use padding-bottom <com.google.android.material.textfield.TextInputLayout app:layout_constraintEnd_toEndOf="parent"...
View ArticleAnswer by Dinesh Bagvan for TextInputLayout :How to give padding or margin to...
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"><item android:top="10dp" android:bottom="5dp"><shape><!--...
View ArticleAnswer by Nouman Ghaffar for TextInputLayout :How to give padding or margin...
This a late answer but hope it helps, And I thinks its a bit better solution. Rather then giving background to your editText , Give that background to your TextInputLayout . And set edittext layout to...
View ArticleAnswer by Arjun for TextInputLayout :How to give padding or margin to hint?
This is what i did in my project for getting enough space between edittext and hint<android.support.design.widget.TextInputLayout android:id="@+id/til_full_name" android:layout_width="match_parent"...
View ArticleAnswer by ashishdhiman2007 for TextInputLayout :How to give padding or margin...
If the requirement is to add space between cursor and hint then you can try editTextComment.setHint(""+getString(R.string.add_a_comment));
View ArticleAnswer by Pavel Poley for TextInputLayout :How to give padding or margin to...
To disable the bottom line cut effect i have used margins, translationY and clipChildren="false"<android.support.design.widget.TextInputLayout android:id="@+id/textinput"...
View ArticleAnswer by Alex Naumchick for TextInputLayout :How to give padding or margin...
Just add to your EditText custom background<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"><item><shape...
View ArticleAnswer by Chandler for TextInputLayout :How to give padding or margin to hint?
@RaduTopor 's answer is good, but I think we also need add android:bottom or else it also de-centres the hint text displayed inside the EditText when not focused<layer-list...
View ArticleAnswer by P. Sukharev for TextInputLayout :How to give padding or margin to...
I made a special class for the purpose of adding empty view above EditText, thus add padding to hint. You can use it as simple TextInputLayout.public class PaddingTextInputLayout extends...
View ArticleAnswer by axd for TextInputLayout :How to give padding or margin to hint?
I tried the padding changes, but it doesn't work well.A simple workaround is to change the height of the TIL:android:layout_height="wrap_content"to (e.g.)android:layout_height="50dp"it might not give...
View ArticleAnswer by Radu Topor for TextInputLayout :How to give padding or margin to hint?
The solution proposed by ganesh2shiv works for the most part, although I've found it also de-centres the hint text displayed inside the EditText when not focused.A better trick is to set the desired...
View ArticleAnswer by Ganesh Mohan for TextInputLayout :How to give padding or margin to...
I have been looking for the solution to this question from last couple of days myself. After tearing my hairs out for hours I have finally found a simple workaround. What I have noticed is that if you...
View Article