android-textinputlayout

Couldn't resolve resource @id/visible when using TextInputLayout

非 Y 不嫁゛ 提交于 2019-12-29 10:47:52
问题 Couldn't resolve resource @id/visible when using TextInputLayout on appcompat-v7:25.x.x Tried these steps below, but the problem is still persist: Rebuild Project Clean and Rebuild Project Clear Cache and Restart Android Studio Below is the code in the layout file. <android.support.design.widget.TextInputLayout android:id="@+id/tilFirstName" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.design.widget.TextInputEditText android:id="@+id/etFirstName"

Couldn't resolve resource @id/visible when using TextInputLayout

爷,独闯天下 提交于 2019-12-29 10:47:31
问题 Couldn't resolve resource @id/visible when using TextInputLayout on appcompat-v7:25.x.x Tried these steps below, but the problem is still persist: Rebuild Project Clean and Rebuild Project Clear Cache and Restart Android Studio Below is the code in the layout file. <android.support.design.widget.TextInputLayout android:id="@+id/tilFirstName" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.design.widget.TextInputEditText android:id="@+id/etFirstName"

Change the TextInputLayout outline color

…衆ロ難τιáo~ 提交于 2019-12-28 07:59:59
问题 I'm trying to customize a TextInputLayout with material style. I managed to set the focused state to the colors I want: Using <com.google.android.material.textfield.TextInputLayout style="@style/LoginTextInputLayoutStyle" android:theme="@style/LoginTextInputLayoutStyle" android:textColorHint="#fff" app:boxStrokeColor="#fff" .....> <EditText ... where the style is: <style name="LoginTextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"> <item name=

Programmatically set TextInputLayout Hint Text Color and Floating Label Color

为君一笑 提交于 2019-12-28 05:58:19
问题 I use a TextInputLayout, I would want to programmatically set the hint text color and the floating label color if the input field is mandatory. Before moving to TextInputLayout I used to set the hint text color programmatically using the following textField.setHintTextColor(Color.RED); Can someone guide me on how to set the hint text color and the floating label color programmatically for a TextInputLayout. In the screenshot attached i would want the hint text Address 1 to be in red when not

In Custom Compound view 'TextInputLayout 'is not showing expanded hint

天涯浪子 提交于 2019-12-25 04:00:42
问题 I've created a custom compound view. It contains an imageview, a TextInputLayout, EditText . The thing is that when i set attributes from xml, it sets all values like hint, icon etc but lines are not changed and expanded hint of TextInputLayout is not showing. When i set lines like this ' textInputLayout.getEditText().setLines(lines); ' it works, but by using 'etInput.setLines(lines);' it doesn't work. Expanded hint is not working. Widget: public class InputLayoutWidget extends LinearLayout {

colorControlActivated for TextInputLayout doesn't work

。_饼干妹妹 提交于 2019-12-24 12:34:13
问题 This is my main style for the application <style name="Theme.RoundRobin" parent="Theme.MaterialComponents.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorSecondaryVariant</item> <item name="colorAccent">@color/colorPrimaryVariant</item> <item name="colorControlActivated">@color/colorControlActivated</item> <item name="colorControlNormal">@color/colorControlNormal</item> <item name=

How to set color of hints in TextInputlayout?

只谈情不闲聊 提交于 2019-12-24 07:47:11
问题 I want to change the hint color of the Text input layout and its associated Edit Text color. I tried to use app:hintTextAppearance="@color/black" <android.support.design.widget.TextInputLayout android:id="@+id/input_layout_edit_contact_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="@color/black" android:textColorHighlight="@color/black" app:hintTextAppearance="@color/black" app:errorTextAppearance="@style/EmailErrorAppearance"> <EditText

TextInputLayout with floating lables on white background Visibility issue in andorid

淺唱寂寞╮ 提交于 2019-12-24 00:37:38
问题 I am creating the simple login screen having textimputlayout floating labels. The java file and xml is given below. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_send_cryptocurrency); // get the reference of View's emailTextInputLayout = (TextInputLayout) findViewById(R.id.emailTextInputLayout); passwordTextInputLayout = (TextInputLayout) findViewById(R.id.passwordTextInputLayout); email = (EditText) findViewById(R.id

change TextInputLayout hint position to right

杀马特。学长 韩版系。学妹 提交于 2019-12-23 15:44:41
问题 Is there anyway to put the TextInputLayout hint at right on top of the editText? and also I don't want editText position to be changed.setting the TextInputLayout gravity to right didn't work,Although it changes the editText position. 回答1: TextInputLayout is designed to meet the floating inline labels material design guidelines, which specify that the hint floats along the start of the EditText . 来源: https://stackoverflow.com/questions/32202994/change-textinputlayout-hint-position-to-right

Preventing TextInputLayout from making TextInputEditText taller

久未见 提交于 2019-12-23 12:28:11
问题 I want that password toggle feature, and it seems TextInputLayout has that feature, not TextInputEditText . But as you see the code below, even though I set the height to wrap_content and app:hintEnabled="false" , the height of TextInputEditText gets taller if the TextInputEditText is in TextInputLayout . Compare that to the height of the TextInputEditText outside the TextInputLayout . Since I do not use that hint animation, there is no need that the TextInputLayout to increase the height of