Tag Archives: edittext

5,190 views

EditText.setOnKeyListener not working on maxLines EditText

Check this in XML file if use singleLine singleLine change to maxLines (1 if singleLine) declare inputType android:maxLines="1" android:inputType="text"

Posted in Android Examples Code, Bugs, warnings, errors | Tagged , , | Comments Off on EditText.setOnKeyListener not working on maxLines EditText
5,244 views

EditText hint not show

Try this solution – into xml file add row to EditText tag: android:textColorHint="@color/grey"

Posted in Android Examples Code, Bugs, warnings, errors | Tagged , , | Comments Off on EditText hint not show
4,254 views

Not request focus EditText if startup Android

Not request focus EditText if startup Android – hide keyboard if startup. Remove: from EditText Create a LinearLayout and set the: attributes android:focusable=”true” android:focusableInTouchMode=”true” <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="true" android:focusableInTouchMode="true" android:orientation="vertical" > </LinearLayout>

Posted in Android Examples Code | Tagged , , | Comments Off on Not request focus EditText if startup Android
10,574 views

Cross Button in EditText Android

Cross Button in EditText Android for deleting clearing text in EditText Example source code: Example allow delete text in EditText by cross button, or do Button click performance. main.xml type your package name and class Put into drawable folder cross … Continue reading

Posted in Android Examples Code, Bitmap, drawing | Tagged , | Comments Off on Cross Button in EditText Android
7,750 views

How set gray text to EditText Android example

Example source code for Android development. How set gray text to EditText when EditText is blank. Hint text to display when the text is empty. In layout/main.xml insert to EditText row Attribute Name android:hint=”Some text”   <EditText android:id="@+id/myEdit" android:layout_height="wrap_content" android:layout_width="fill_parent" … Continue reading

Posted in Android Examples Code | Tagged , , | Comments Off on How set gray text to EditText Android example
7,441 views

EditText text changed java Android

Google Android example source code – is text changed in EditText ? EditText hEditText; // TextChanged in onCreate hEditText = (EditText)findViewById(R.id.idEditText); hEditText.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable str) { }   public void beforeTextChanged(CharSequence s, int start, int count, int … Continue reading

Posted in Android Examples Code | Tagged , , , | Comments Off on EditText text changed java Android