Questions tagged [android-textinputlayout]

Layout which wraps an EditText (or descendant) to show a floating label when the hint is hidden due to the user inputting text.

Layout which wraps an EditText (or descendant) to show a floating label when the hint is hidden due to the user inputting text. Also supports showing an error via setErrorEnabled(boolean) and setError(CharSequence).

887 questions
-1
votes
2 answers

Showing errors with TextInputLayout after adding material dependency

I just want to know why my all TextInputLayout not applying outlined style after adding material dependency. Actually I implemented the material dependency for the badge drawable and tabmediator in my project so If delete that dependency my…
-1
votes
1 answer

How to change line and hint colors of TextInputEditText programmatically?

1) Getting color from the server 2) Than changing the line and hint of the TextInputEditText to that color (for all states) I am using material:1.0.0 for androidx
-1
votes
1 answer

TextInputEditText error when running acitivity

android.view.InflateException: Binary XML file line #107: Error inflating class android.support.design.widget.TextInputEditText This is my gradle build : dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation…
-1
votes
1 answer

Cannot use TextInputLayout in Fragment

I cannot seem to be able to use TextInputLayout in fragment. Here is my code.
Abdurakhmon
  • 2,813
  • 5
  • 20
  • 41
-1
votes
1 answer

TextInputLayout with counter - How to not account for empty spaces?

To remove empty spaces of a String at the beginning and at the end, we can use the trim method. The problem is, the TextInputLayout's counter still counts these empty fields. As you can see in the screenshot, it takes my input as valid because it is…
-1
votes
1 answer

Could not instantiate android.support.design.widget.TextInputLayout

I'm trying to use android.support.design.widget.TextInputLayout but i get this exception java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library. at…
-1
votes
2 answers

TextInputLayout change color to gradient

Is there a way to change any of the TextInputLayout's color to have a gradient. The answers I've seen so far allow the normal, activated, and highlighted colors to be changed to a single color through XML.
stumped
  • 3,235
  • 7
  • 43
  • 76
-1
votes
3 answers

Show all setError messages in Android

if (!validateEmail(email) || (TextUtils.isEmpty(email))) { emailwrapper.setError("Invalid email"); } else { emailwrapper.setError(null); } if (password.length() < 6 || (TextUtils.isEmpty(password))) { …
HackNode
  • 159
  • 2
  • 11
-1
votes
1 answer

TextInputLayout not showing hint text fully

I'm using recently released Android Design Support Library to show floating label with EditTexts. But I'm facing the problem that the Hint text is max hint text does not show fully it show ..... on rest of words. My Layout is as…
-1
votes
2 answers

How to change drawable resource at run time?

I want to change the drawable resource file at runtime. .java file code protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btn =…
Uzair Mughal
  • 309
  • 4
  • 15
-1
votes
1 answer

Cannot Dynamically Add TextInputLayout Views

I want to populate TextInputLayouts based on the item that a user selects from a Spinner. Below is my XML (the ID with "CreatePollAnswer" is the view I want to populate dynamically):
tccpg288
  • 3,242
  • 5
  • 35
  • 80
-1
votes
1 answer

Text of TextInputLayout gets shifted parallel to EditText text

I would like to ask, when i will give left padding to EditText then text of TextInputLayout also get shifted to right parallel to the text of EditText. I want to give padding to EditText only, i want text of TextInputLayout remain at same…
-2
votes
1 answer

Why am I getting error of 'android.widget.EditText com.google.android.material.textfield.TextInputLayout.getEditText()' on a null object reference

I have seen many forums related to this question but nothing resolved my issue. I hope I get it here. Here is my Activity Code public class addIndividual extends AppCompatActivity { public TextInputLayout individualName; public TextInputLayout…
-2
votes
2 answers

android TextInputLayout.class.getDeclaredField("mErrorView") throws exception

I wants to make my TextInputlayout setError in right side of the view. I tried with CustomTextInputlayout.TextInputLayout.class.getDeclaredField("mErrorView") throws exception. MyProject having androidX library. java.lang.NoSuchFieldException: No…
-2
votes
1 answer
1 2 3
59
60