Tutorial by Examples: edittext

Create this class : public class InputFilterMinMax implements InputFilter { private int min, max; public InputFilterMinMax(int min, int max) { this.min = min; this.max = max; } public InputFilterMinMax(String min, String max) { this.min = Integer...
void alertDialogDemo() { // get alert_dialog.xml view LayoutInflater li = LayoutInflater.from(getApplicationContext()); View promptsView = li.inflate(R.layout.alert_dialog, null); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( ...
The TextInputEditText is an EditText with an extra fix to display a hint in the IME when in 'extract' mode. The Extract mode is the mode that the keyboard editor switches to when you click on an EditText when the space is too small (for example landscape on a smartphone). In this case, using an Ed...
Changing the edit text's appearance when it's selected, pressed and not selected can be customised easily by adding creating a new style for your edit text like so <style name="EditTextTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorContr...
The EditText is the standard text entry widget in Android apps. If the user needs to enter text into an app, this is the primary way for them to do that. EditText There are many important properties that can be set to customize the behavior of an EditText. Several of these are listed below. Check ...
This example will help to have the Edit text with the icon at the right side. Note: In this just I am using setCompoundDrawablesWithIntrinsicBounds, So if you want to change the icon position you can achieve that using setCompoundDrawablesWithIntrinsicBounds in setIcon. public class MKEditTe...

Page 1 of 1