899 questions
0
votes
0
answers
41
views
Can I use TextInputEditText without TextInputLayout?
For a project, I was analyzing part of a Java code structure for mobile applications. During the analysis, I realized that it didn't have a TextInputLayout, but right at the beginning it imports a ...
0
votes
0
answers
38
views
How to level two TextInputLayout next to each other when one has END_ICON_CLEAR_TEXT and the other END_ICON_NONE?
Consider that:
Al2TextView inherits from TextView
Al2TextInputLayout inherits from TextInputLayout
Al2TextInputEditText inherits from TextInputEditText
When entering text into the second field (...
1
vote
1
answer
41
views
Why is the Drawable on the TextInputLayout not clearly visible?
I am trying to add a microphone button to a text field so that users can speak which will be translated to text.
My layout looks as below:
<com.google.android.material.textfield.TextInputLayout
...
1
vote
1
answer
110
views
How to add Different Padding Between Floating Hint and Input Text in Custom TextInputLayout?
I'm working on a custom TextInputLayout in my Android project. I need to differentiate the padding between the floating hint (label) and the input text. When the hint is floating (acting as a label), ...
0
votes
0
answers
29
views
app:passwordToggleEnabled not working, no funciona
I am working on a login for my application, but I implemented an app:passwordToggleEnabled, but it is not visible, I even added an app:passwordToggleTint but it is still not visible, I hope you can ...
0
votes
1
answer
68
views
How to show border on TextInputLayout in Android Kotlin without MaterialComponents support
How to show border on TextInputLayout in Android without MaterialComponents.
I have an AppCompatActivity using AppTheme.DialogTheme to show the Activity as a Dialog, but this configuration does not ...
0
votes
0
answers
77
views
Input jump on TextInputLayout from empty to filled state
I am using textInputlayout and textInputEditText from material design. Everything works fine until i use some of the custom fonts from the resource file. When user starts typing on the ...
0
votes
1
answer
37
views
Fixing hint placement in my Android application
So, I use TextInputLayout and EditText to input email, but I have some trouble with hint placement. I also don't know how to change the color of this "I" symbol. Here is my XML for this ...
0
votes
1
answer
29
views
How to toggle visibility of two password fields with one toggle in Android XML using Kotlin?
I have two password fields one is password another is confirm password. I want to use only one toggle in password field EditText using TextInputLayout's property passwordToggleEnabled="true"....
1
vote
1
answer
354
views
How to maintain keyboard focus with a searchable dropdown menu in Jetpack Compose?
I'm trying to implement a searchable dropdown menu in Jetpack Compose, but whenever the dropdown appears, the keyboard loses focus and disappears. How can I modify the code to prevent the keyboard ...
0
votes
1
answer
52
views
No space for OutlinedBox TextInputLayout label
The outline for an OutlinedBox TextInputLayout doesnt leave a space for the hint/label:
<com.google.android.material.textfield.TextInputLayout
xmlns:android="http://schemas.android.com/...
0
votes
1
answer
63
views
Remove extra padding on start of TextInputLayout
The start text of textinput layout is getting cut
Is it possible to remove the padding inside the textinput layout?
TextInput style
<style name="Widget.TextInputLayoutx" parent="...
0
votes
1
answer
85
views
How to show success state on TextInputLayout (similar to setError())
I need to show a success state on Material's TextInputLayout. I just need the same UI as this layout shows when an error is set. Following is what I need:
class CustomTextInputLayout(
context: ...
0
votes
1
answer
168
views
Android Custom TextInput Layout with Hint text and Placeholder are overlapping
I'm facing a weird issue while using a custom TextInputLayout where i have both hint text and placeholder text, in general scenario when the focus comes on the edit text then hint text float up and ...
0
votes
0
answers
53
views
Center text vertically inside Android material TextInputLayout when it has fixed height in DP
I have a TextInputLayout which I want to have its height defined explicitly in DP.
When I tried that, the text was not aligned inside TextInputLayout vertically in center. This question already asked ...
0
votes
2
answers
123
views
How to display a clickable link in TextInputLayout error message, app:setError in android
I have a text input field that takes name as input. The layout contains an EditText widget inside the TextInputLayout. When the user input is blank, I want to display an error validation message ...
0
votes
0
answers
40
views
Textinputlayout space between hint and edittext
Is there some way to add space between hint and edittext? My edittext is multiline and when theres to much text and lines hint can overlap edittext.
I want additional spacing between hint and ...
0
votes
1
answer
958
views
Custom TextField in Jetpack Compose
I am trying to design the TextField (based on the layout based styles of TextInputLayout and TextInputEditText).
I need to achieve the below design.
Like, the error message should appear below the ...
0
votes
2
answers
78
views
TextInputEditText Hint remains in the background when the field value is set programmatically
I determine the user's location and display it in a TextInputEditText field. The hint, however, remains in the background. What am I doing wrong?
<com.google.android.material.textfield....
2
votes
4
answers
443
views
How to prevent automatic resizing of MaterialAlertDialogBuilder height when the keyboard is open?
I have built a custom dialog with MaterialAlertDialogBuilder. The dialog has 2 TextInputLayouts. The problem is when I try to write something in the TextInputEditText and when the keyboard is visible, ...
0
votes
0
answers
23
views
TextInputLayout Dropdown menu getting Failed to instantiate one or more classes
The following classes could not be instantiated:
- com.google.android.material.textfield.TextInputLayout (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to ...
0
votes
1
answer
61
views
Multiline TextInputEditText with height wrap_content not restoring size
If have a following layout in xml. It's a part of bigger layout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layoutInputNewText"
android:...
0
votes
0
answers
42
views
When my activity recreates TextInputEditText all methods (beforeTextChanged, onTextChanged, afterTextChanged ) called pointlessly
I change the darkTheme as follows in the SettingsFragment under MainActivity and MainActivity is recreated normally. However, when I return to the MainFragment later, all the methods in the ...
0
votes
1
answer
316
views
Android TextInputLayout Autofill
I am developing an android app, I've used TextInputLayouts to take input from user, while testing it on api level 24 it doesn't cause any problem but when i tried to test it on latest phones some ...
0
votes
1
answer
22
views
Why does my device automatically unselect my TextInputLayout/TextInputEditText with an external keyboard?
I have an cardview adapter where each card is a form of filling in a mandatory value (if the user want to save the value) and an optional commentbox.
This mandatory value and the optional commentbox ...
1
vote
0
answers
56
views
setError icon overlapping the outline of TextInputLayout (TextInputEditText)
So I've been having this problem for a while now and can't figure out how to fix it. The same thing was happening with ExposedDropdownMenu and the arrow icon on the end, but I gave up eventually.
I've ...
0
votes
1
answer
51
views
Change the default behaviour of edit text in android
So I have make a bottom sheet drawer inside it i have a recycler view which have a set of item in list manner. so every item on click opens and have a chat box in it. so the problem here is i have ...
0
votes
2
answers
74
views
TextInputLayout hint position wrong
I'm trying to manage the hint in a TextInputLayout/TextInputEditText, moving it inside a rounded shape, but I can't manage to move it, like in the picture:
enter image description here
This is my ...
1
vote
0
answers
515
views
android autofill ignores importantForAutofill="no"
i have a form layout with multiple TextInputLayouts (containing a TextInputEditText).
Two of those field are used to input given- and familyname. Another field is the contact id ("Kontaktnummer&...
0
votes
1
answer
173
views
TextInputLayout error text align right not working
As per design I require TextInputLayout error text at right side, explored and tried below style, but didn't success.
<style name="Theme.Input" parent="Widget.MaterialComponents....
1
vote
1
answer
94
views
Programatically created TextInputLayout not showing outlined box
I want to create a material edittext field like this :
enter image description here
This is how I am creating the editext field:
TextInputLayout textInputLayout = new TextInputLayout(MainActivity.this)...
0
votes
1
answer
131
views
Android TextInputLayout hint overlapping EditText's background
I have a typical TextInputLayout/TextInputEditText combination with a custom drawable as the EditText background:
<com.google.android.material.textfield.TextInputLayout
android:...
0
votes
1
answer
71
views
Changing TextInputEditText's select mode color
I am using TextInputLayout and TextInputEditText. I cant find a way to change this purple color. I searched about it too but i cant find so much. How can i change it?
0
votes
3
answers
310
views
How can I see if the endIcon in a TextInputLayout is checked?
There is an isEndIconChecked() in the EndCompoundLayout but I cannot see any access method to it from the TextInputLayout.
Whats the best way to detect if it is currently checked or not?
In my case I ...
0
votes
1
answer
453
views
Design Layout not shown after using TextInputLayout and TextInputEditText
I have met a problem when I try to use the TextInputLayout and TextInputEditText.
Here is my code
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget....
0
votes
1
answer
399
views
TextInputLayout - How to decrease the spacing between the hint (no text & focus mode) to the bottom line
I'm using TextInputLayout to create some layout.
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/cvvContainer"
android:layout_width="...
0
votes
1
answer
213
views
How do I change the boxBackgroundColor of TextInputLayout dropdown while selected?
So I want a transparent box background color even while my dropdown is selected, but by default it is being tented to darker color.. Check out the images below.
Not selected
Selected
Here's my code
&...
1
vote
1
answer
576
views
My app crashes when i use style in textfield.TextInputLayout
I want to add a style to my textfield.TextInputLayout, but when I add the app crashes and get error(This component requires that you specify a valid TextAppearance attribute. Update your app theme to ...
0
votes
1
answer
85
views
Kotlin - Android: Two-way databinding custom property on custom view
I've created a custom view for selecting days of the week which results is a string. I'd like to use it with two-way data binding.
<?xml version="1.0" encoding="utf-8"?><...
0
votes
2
answers
121
views
Android TextInputLayout hint gets bugged when recycled by a RecyclerView
USE CASE
I have a RecyclerView whose ViewHolder contains a TextInputLayout. For some situations I want it to display a hint and for other situations I don't.
ISSUE
When the RecyclerView recycles a ...
2
votes
2
answers
2k
views
Equivalent of "expandedHintEnabled" in Jetpack Compose TextField
Is there any way to put OutlinedTextField's label on top (expanded) and still have the placeholder, when OutlinedTextField is not in focus?
In xml layouts we have TextInputLayout that has ...
0
votes
0
answers
285
views
How to add elevation to the textInputLayout in android?
I try to add elevation to my TextInputLayout but android:elevation="10dp doesn't work!
How can I do this?
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/...
1
vote
2
answers
353
views
Keep startIcon at top left position when using multi-line textview
I've got the following layout:
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
2
votes
1
answer
89
views
Android Studio cannot show design layout after adding a view
I'm getting a rare error when I've tried to add a TextInputLayout to a simple layout for a Dialog, the editor stops to show the design mode WTF.
What's wrong? Restarting Android Studio, doesn't work.
...
5
votes
0
answers
92
views
Displaying keyboard below the the selected line using multi-line TextField
so I've got the following layout with the following TextInputEditText :
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:...
0
votes
1
answer
300
views
Get start and end icon view from TextInputLayout
I want to get the end and start icon view from TextInputLayout so I can do stuff like check if it is hovered or not.
I don't know where to start (idk if this is possible), so any help will be greatly ...
0
votes
2
answers
542
views
TextInputLayout is always focusable when activity start. how can I solve this issue?
When activity is started TextInputlayout with edittext always auto focasable. i try
android:focusableInTouchMode="true"
but it doesn't work. Hear is my code.
<com.google.android....
3
votes
2
answers
645
views
How to remove right padding/margin to a TextInputLayout prefix
TextInputLayout prefix has a small but noticeable spacing to the subsequent text in the TextInputEditText.
In the following image, The first www is the prefix, the following are the regular text. I ...
1
vote
1
answer
399
views
Android - Create an AutoCompleteTextView Programmatically (no xml at all)
I would like to add an AutoCompleteTextView Programmatically for an app, without referencing any items in a XML layout.
This is what I would like to achieve:
The XML code is the following:
<com....
0
votes
1
answer
105
views
TextInputLayout - Hint padding issue
I am using textInputLayout in my application, but I am getting additional padding to the Hint. Can anyone help me out.
Screenshot:
Xml Code:
<com.google.android.material.textfield.TextInputLayout
...