Java Code Examples for android.support.design.widget.TextInputLayout#requestFocus()
The following examples show how to use
android.support.design.widget.TextInputLayout#requestFocus() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AddDataStreamActivity.java From AndroidSDK with MIT License | 5 votes |
private boolean checkInput(TextInputLayout textInputLayout, int errorResId) { String text = textInputLayout.getEditText().getText().toString(); if (TextUtils.isEmpty(text)) { textInputLayout.setError(getResources().getString(errorResId)); textInputLayout.requestFocus(); return false; } return true; }
Example 2
Source File: AddDeviceActivity.java From AndroidSDK with MIT License | 5 votes |
private boolean checkInput(TextInputLayout textInputLayout, int errorResId) { String text = textInputLayout.getEditText().getText().toString(); if (TextUtils.isEmpty(text)) { textInputLayout.setError(getResources().getString(errorResId)); textInputLayout.requestFocus(); return false; } return true; }
Example 3
Source File: EditDeviceActivity.java From AndroidSDK with MIT License | 5 votes |
private boolean checkInput(TextInputLayout textInputLayout, int errorResId) { String text = textInputLayout.getEditText().getText().toString(); if (TextUtils.isEmpty(text)) { textInputLayout.setError(getResources().getString(errorResId)); textInputLayout.requestFocus(); return false; } return true; }