Tag: android-edittext

How to change EditText bubble color (under cursor) in android?

How to change the color of EditText bubble in android, I could do change the cursor drawable but I want change color of Bubble, please share idea on it. Reference screenshot: Any help would be appreciated.

Android :EditText loses content on scroll in ListView?

I have list item with EditText in it, I don’t know how many items there will be. I have a problem when I enter some text in EditText, and then scroll down a ListView, after I’ve scroll up again there is no text in my first EditText, or there is some text from other EditText […]

Highlight All Words that is searched via EditText

Hello I want to know how to highlight all Words that is inputted in the EditText and will appear in the TextView this post is related to this one Highlight Textview Using EditText

Edittext android automatic focus

I have an issue when the activity starts, android automatically places focus on the first edittext. How do I prevent android from doing that?

Open EditTextPreference through code (programatically)

I have made the EditTextPreference ‘textPasscode’ dependant on a CheckBoxPreference ‘checkBoxPasscode’. I want the ‘textPasscode’ to open up as soon as the user checks the check box.. Is it even possible?? If it is, what can I use in the onSharedPreferenceChanged() function? public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if(key.contentEquals(“checkBoxPasscode”)){ // —-some method to open […]

How does Kotlin property access syntax work for Java classes?

I’m trying to switch my Android project to Kotlin. I have an EditText (a subclass of TextView) for which I want to set a hint and text programmatically. The hint works as expected. For text, though, I’m getting a type mismatch exception if I try to do it using Kotlin setter syntax: val test = […]

Android EditText: select all text while touch and clear when user starts typing.

I have a edit text in my app. When the user touches the edit text the whole text should be selected and when he starts typing text should be cleared. An example is browser address bar. Is there any way to do this?Please help me.

Android EditText(“Textbox”) : Auto capitalizing first letter of each word while user typing

I know this question has asked several times but non of the answers worked in my case. I found some of the same sort of questions and answers in the following links , which didn’t work for me at all. LINK1 LINK2 In my layout file, I have defined my EditText as follows. <EditText android:id=”@+id/test_editText” […]

Disable Predictive Text in EditText

I think this is a pretty simply question, but how do I disable the predictive text for an EditText in Android. Do I set a property in the EditText’s XML or a property in the EditText’s object… or both? Thanks!

Android: Limiting EditText to numbers

When creating an EditText in the java portion of the application, how do you limit it to numbers like you would in the xml? For example: new EditText(this); set like <EditText android:id=”@+id/h1″ android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:inputType=”numberDecimal”/>

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