Java Code Examples for android.widget.TextView#setImeOptions()

The following examples show how to use android.widget.TextView#setImeOptions() . 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: DatePickerSpinnerDelegate.java    From DateTimePicker with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the IME options for a spinner based on its ordering.
 *
 * @param spinner      The spinner.
 * @param spinnerCount The total spinner count.
 * @param spinnerIndex The index of the given spinner.
 */
private void setImeOptions(NumberPicker spinner, int spinnerCount, int spinnerIndex) {
    final int imeOptions;
    if (spinnerIndex < spinnerCount - 1) {
        imeOptions = EditorInfo.IME_ACTION_NEXT;
    } else {
        imeOptions = EditorInfo.IME_ACTION_DONE;
    }
    TextView input = (TextView) spinner.findViewById(R.id.numberpicker_input);
    input.setImeOptions(imeOptions);
}
 
Example 2
Source File: DatePicker.java    From ticdesign with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the IME options for a spinner based on its ordering.
 *
 * @param spinner The spinner.
 * @param spinnerCount The total spinner count.
 * @param spinnerIndex The index of the given spinner.
 */
private void setImeOptions(NumberPicker spinner, int spinnerCount, int spinnerIndex) {
    final int imeOptions;
    if (spinnerIndex < spinnerCount - 1) {
        imeOptions = EditorInfo.IME_ACTION_NEXT;
    } else {
        imeOptions = EditorInfo.IME_ACTION_DONE;
    }
    TextView input = (TextView) spinner.findViewById(R.id.numberpicker_input);
    input.setImeOptions(imeOptions);
}