android-textinputlayout

EditText added is not a TextInputEditText. Please switch to using that class instead

风格不统一 提交于 2019-11-27 00:32:24
问题 I'm using an EditText inside a TextInputLayout , but after upgrading the support library to 23.2.0, I get this warning in the logcat, What's the difference between a regular EditText and a TextInputEditText ? I can't seem to find any documentation for it. 回答1: I was wondering this too, Daniel Wilson gathered the documentation, but to the untrained eye it doesn't mean much. Here's what it's all about: "extract mode" is referring to the type of view that's shown when the space is too small, for

Change thickness of the bottom line of EditText when wrapped into TextInputLayout

老子叫甜甜 提交于 2019-11-26 19:58:55
问题 here is my code XML Markup <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/TextLabel"> <EditText android:id="@+id/etContactName" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Contact Name"/> </android.support.design.widget.TextInputLayout> Style <style name="TextLabel" parent="TextAppearance.AppCompat"> <item name="android:textColorHint">@color/hintColor</item

TextInputLayout has no effect for giving hint programmatically in EditText

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 18:17:02
问题 I have an EditText and it's parent is TextInputLayout. I am trying to give hint programmatically for EditText, (not in layout) in this case Text input hint animation is not working, it's working like simple EditText. can some one suggest how to handle it. below is my layout. <android.support.design.widget.TextInputLayout android:id="@+id/text_input_layout" android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/post_EditTextPostAnAd" style="@style

Change font of the floating label EditText and TextInputLayout

99封情书 提交于 2019-11-26 16:07:15
问题 Someone tried to change the font of the floating label? I changed the source of EditText but the font of the floating label did not change, I am very grateful to those who help me Code: <android.support.design.widget.TextInputLayout android:id="@+id/tilTextoDescricao" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/tilValorUnidade" android:layout_marginTop="10dp"> <EditText android:id="@+id/etTextoDescricao" android:layout_width="fill

Do not change TextInputLayout background on error

不打扰是莪最后的温柔 提交于 2019-11-26 15:58:34
问题 I would like to have an EditText with the background as a "normal" EditText but with the error handling of a TextInputEditText (error message appearing at the bottom, and not the "!" drawable appearing). I got something like this : <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:setError="@{viewModel.error}"> <android.support.design.widget.TextInputEditText android:layout_width="match_parent" android:layout_height=

TextInputLayout :How to give padding or margin to hint?

为君一笑 提交于 2019-11-26 15:57:54
问题 I have to use TextInputLayout of design support library in my project. I want to give space between hint and EditText in TextInputLayout . I set margin and padding in TextInputLayout and even inside EditText but both are not work.So how to solve this issue. Here i attach screen shot and my coding. ==============================Style================================= <style name="TextHint" parent="Base.TextAppearance.AppCompat"> <item name="android:textSize">18sp</item> <item name="android

Outlined Edit Text from Material Design

柔情痞子 提交于 2019-11-26 15:26:21
How to implement an Outlined text fields presented in Material Design page Link Read Outline Box . Outline text fields have a stroked border and are less emphasized. To use an outline text field, apply the following style to your TextInputLayout: style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" dependencies implementation 'com.android.support:design:28.0.0-alpha1' XML <android.support.design.widget.TextInputLayout android:id="@+id/name_text_input" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height=

TextInputLayout Hint doesn&#39;t float up after updating Google Support Library

穿精又带淫゛_ 提交于 2019-11-26 11:35:41
问题 I recently updated my support library to com.android.support:appcompat-v7:25.1.0 after which if I add a text to EditText via xml file the TextInputLayout hint doesn\'t float up. I also had a look at this question but it didn\'t worked for me. Here is my xml code: <android.support.design.widget.TextInputLayout android:layout_width=\"wrap_content\" android:layout_height=\"wrap_content\" android:layout_marginTop=\"16dp\" app:layout_constraintTop_toTopOf=\"parent\" app:layout_constraintBottom

How to set TextInputLayout error message colour?

萝らか妹 提交于 2019-11-26 08:07:43
问题 How can I change the colour of the error message that can be set to appear below the text field in a TextInputLayout (via setError(...) – see error state here)? It normally shows as a red colour, which I want to change. Which item names/keys should I use in my styles.xml file to target the colour? Thanks in advance. Edit: Added app:errorTextAppearance key to my TextInputLayout : <android.support.design.widget.TextInputLayout android:layout_width=\"match_parent\" android:layout_height=\"wrap

Outlined Edit Text from Material Design

我的未来我决定 提交于 2019-11-26 02:23:20
问题 How to implement an Outlined text fields presented in Material Design page Link 回答1: Read Outline Box . Outline text fields have a stroked border and are less emphasized. To use an outline text field, apply the following style to your TextInputLayout: style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" dependencies implementation 'com.android.support:design:28.0.0-alpha1' XML <android.support.design.widget.TextInputLayout android:id="@+id/name_text_input" style="@style/Widget