android-textinputlayout

TextInputLayout error alignment issue with AppCompat Spinner

ε祈祈猫儿з 提交于 2019-12-10 10:05:13
问题 I am using an app which displays a drop down Spinner with an EditText as a child of TextInputLayout next to it. When an underlined error is shown under the TextInputLayout , then the EditText will go up, and alignment will miss !! See my screenshot please: What I am trying to do is: Here is my xml code: <LinearLayout android:layout_width="@dimen/edittext_width" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="bottom"> <android.support.v7.widget

android : TextInputLayout hides drawableRight of child EditText

佐手、 提交于 2019-12-10 02:30:48
问题 I am always updated with library updates, and this is what it resulted into. In build.gradle(Project:xxx): classpath 'com.android.tools.build:gradle:2.2.0-beta1' In build.gradle(Module:app) compile 'com.android.support:appcompat-v7:24.2.0' compile 'com.android.support:design:24.2.0' And put password field as below: <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.AppCompatEditText android:layout

How to disable padding on TextInputLayout?

笑着哭i 提交于 2019-12-09 02:28:00
问题 There appears to be left padding automatically added when using a TextInputLayout to wrap an EditText as you can see in the screenshot below. There is no padding added to the EditText in the layout XML, but when the view is rendered there appears to be left padding on the EditText . You can see this when comparing the TextView below the TextInputLayout . How do I disable this left padding from being added? Thank you! 回答1: TextInputLayout is a LinearLayout , so you should be able to specify a

android.support.design.widget.TextInputLayout gives InflateException

拜拜、爱过 提交于 2019-12-08 06:19:55
问题 I am trying to use TextInputLayout in design library and I added support libraries as following: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.1' compile 'com.google.android.gms:play-services:4.0.30' compile "com.android.support:support-v4:+" compile 'com.squareup.picasso:picasso:2.3.2' compile 'com.nineoldandroids:library:2.4.0' compile 'com.daimajia.slider:library:1.1.5@aar' compile 'com.navercorp.pulltorefresh:library:3.2.0

EditText with TextInputlayout layout With hint and Border

独自空忆成欢 提交于 2019-12-08 02:47:13
问题 I want EditText like one in above image. The problem is that if I use TextInputLayout it shows default bar at the bottom and I want it with custom borders around it. I also tried using the below examples, Custom TextInputLayout android 回答1: You can do it either using vector drawable as background of TextView or by the following method: <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout android:id="@+id/input

How to set multiple colors to a floating Edittext's hint?

我是研究僧i 提交于 2019-12-08 02:27:44
问题 Is there a way to set multiple colors to the edittext's hint when wrapped by android.support.design.widget.TextInputLayout without compromising the behaviour of floating edittexts? AFAIK The only way to set multiple colors to the edittext hint is by using SpannableStringBuilder. But when the editext is wrapped by TextInputLayout and the hint set programmatically using a SpannableStringBuilder, it behaves like a normal editext which does not float (the labels aren't floating) Whereas if the

In TextInputLayout change the color of hint for single letter or alphabet

丶灬走出姿态 提交于 2019-12-07 17:34:14
问题 I have defined TextInputLayout programmatically in my Activity. I have added EditText inside that TextInputLayout, that to programmatically. Now, I have to set the color of hint of that edittext. Here I just have to change the color of single alphabet of the hint. Example - Hint is like, Firstname *. Here i want to change the color of "*" to Red and remaining hint as black in color. I have already tried Html and Spannable String, but both are not working for TextInputLayout. For Spannable i

EditText in TextInputLayout lagging

。_饼干妹妹 提交于 2019-12-07 07:23:54
问题 I have two views using TextInputLayout . The first one is a login view which has only 2 input fields and the second one is a register view which has many input fields. I am using TextInputLayout and EditText / AppCompatEditText with custom themes for my inputs. The problem is, when i click on my EditText 's in my Register screen i get a kind of lag/spikes on the default TextInputLayout animation. I don't get the lag in my LoginScreen but the code I'm using is quite the same, so i suppose the

TextInputLayout error text padding

情到浓时终转凉″ 提交于 2019-12-07 04:00:42
问题 I am using TextInputLayout with AppCompatEditText having a custom xml shape based background for AppCompatEditText . Whenever i set some error , the error line starts from beginning of layout. Is there any way to give padding to that error line. 回答1: You can reference error TextView by using: TextView textView = (TextView) inputLayout.findViewById(android.support.design.R.id .textinput_error); Then you can get its layout params to work with. 回答2: <android.support.design.widget.TextInputLayout

android.support.design.widget.TextInputLayout gives InflateException

三世轮回 提交于 2019-12-07 03:53:25
I am trying to use TextInputLayout in design library and I added support libraries as following: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.1' compile 'com.google.android.gms:play-services:4.0.30' compile "com.android.support:support-v4:+" compile 'com.squareup.picasso:picasso:2.3.2' compile 'com.nineoldandroids:library:2.4.0' compile 'com.daimajia.slider:library:1.1.5@aar' compile 'com.navercorp.pulltorefresh:library:3.2.0@aar' compile fileTree(dir: 'libs', include: 'Parse-*.jar') compile fileTree(dir: 'libs', include: