Tag: android-edittext

TextInputLayout: RuntimeException – Failed to resolve attribute at index 24

I keep on getting this error when I try to setErrorEnabled on my textInputLayout : 03-12 12:29:03.206 5706-5706/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.myapp, PID: 5706 java.lang.RuntimeException: Failed to resolve attribute at index 24 at android.content.res.TypedArray.getColor(TypedArray.java:401) at android.widget.TextView.<init>(TextView.java:696) at android.widget.TextView.<init>(TextView.java:632) at android.widget.TextView.<init>(TextView.java:628) at android.widget.TextView.<init>(TextView.java:624) at android.support.design.widget.TextInputLayout.setErrorEnabled(TextInputLayout.java:380) at com.bekwaai.popupwindow.RGNamePopUp$1.onClick(RGNamePopUp.java:48) at android.view.View.performClick(View.java:4780) at android.view.View$PerformClick.run(View.java:19866) at android.os.Handler.handleCallback(Handler.java:739) at […]

Android: Center text inside EditText programatically

As the title says, is there any way to center the inputted text in an EditText field. More specifically, instead of the cursor starting at the left of the box, it should start in the center and move outward towards the left as it is populated with inputs.

EditText tab order

I have a layout consisting of a LinearLayout with a vertical orientation containing several EditTexts. The virtual keyboard of each of these EditTexts has a “next” button. Pressing the “next” button moves the cursor to the EditText below it. However, somewhere in the middle of these EditTexts I added another LinearLayout, this one horizontal, with […]

Difference between android:inputType=“textPassword”, “textVisiblePassword”,“textWebPassword” and “numberPassword” in android?

Can anyone explain the differences between the android:inputType=”textPassword”, android:inputType=”textVisiblePassword”, android:inputType=”textWebPassword”, android:inputType=”numberPassword” of EditText ViewGroup in Android Layout?

EditText: Differentiate between text change by setText() or by keyboard input

I have an EditText View which is edited by setText() from my code and by the user via (soft/hard) keyboard and – if possible by speech input. I want to handle input made by my code in another way than normal user input: if a user input happens, a internal event shall be fired. But […]

Custom Keyboard: handling inputType change

I am running into an issue that I can’t figure out. I wrote a simple custom IME keyboard based on this sample. It basically has two custom keyboards, one for letters and one for numbers. They use different layouts. However, when I add two EditText controls one for text and one for numbers, the keyboard […]

EditText and TabHost do not like each other

I have a layout with EditText and TabHost containing 2 tabs. Android 1.6. I use hardware keyboard in following case. Steps to reproduce: When activity is displayed the EditText gains focus. As soon as I press any key the EditText loses focus and first tab gains it. I click on the EditText again and start […]

Android material chips

I want to implement an autocomplete edittext with chips in my application and I want to do it in a way that it’s done here: material design chips. First I would like to ask if there is some kind of widget (maybe as part of the new support library) or a solution that I can […]

Android show EditText.setError() above the EditText and not below it

When i call EditText.setError(); the error appears below the edittext, and makes it impossible to interact with the View below the EditText. Is it possible to show the error above the EditText? Google doesn’t seem to have the answer(Or i’m using wrong search terms).

android EditText ,keyboard textWatcher problem

I am working on a android app and I have an EditText where user can input numbers. I want to format the number using different currency formats (say ##,##,###) and I want to do it on the fly, ie when user enter each digit(not when enter is pressed). I googled around, and came across TextWatcher […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.