Dialog createDialog () { textView = createView(context); textView.setOnKeyListener(this); FrameLayout.LayoutParams textBoxLayoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM); textView.setLayoutParams(textBoxLayoutParams); textView.setFocusable(true); textView.setFocusableInTouchMode(true); textView.setImeOptions(textView.getImeOptions() | EditorInfo.IME_FLAG_NO_EXTRACT_UI); final FrameLayout layout = new FrameLayout(context); ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0); layout.setLayoutParams(layoutParams); layout.addView(textView); layout.setOnTouchListener(this); dialog = new Dialog(context, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen); dialog.setContentView(layout); return dialog; }
Dialog createDialog () { textView = createView(context); textView.setOnKeyListener(this); FrameLayout.LayoutParams textBoxLayoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM); textView.setLayoutParams(textBoxLayoutParams); textView.setFocusable(true); textView.setFocusableInTouchMode(true); textView.setImeOptions(textView.getImeOptions() | EditorInfo.IME_FLAG_NO_EXTRACT_UI); final FrameLayout layout = new FrameLayout(context); ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0); layout.setLayoutParams(layoutParams); layout.addView(textView); layout.setOnTouchListener(this); dialog = new Dialog(context, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen); dialog.setContentView(layout); return dialog; }
/** * 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 = NumberPickers.findEditText(spinner); input.setImeOptions(imeOptions); }
/** * Sets the IME options for a NPicker based on its ordering. * * @param NPicker The NPicker. * @param NPickerCount The total NPicker count. * @param NPickerIndex The index of the given NPicker. */ private void setImeOptions(NumberPicker NPicker, int NPickerCount, int NPickerIndex) { final int imeOptions; if (NPickerIndex < NPickerCount - 1) { imeOptions = EditorInfo.IME_ACTION_NEXT; } else { imeOptions = EditorInfo.IME_ACTION_DONE; } TextView input = NPicker.findViewById(R.id.number_picker_edit_text); input.setImeOptions(imeOptions); }
/** * Sets the IME options for a NPicker based on its ordering. * * @param NPicker The NPicker. * @param NPickerCount The total NPicker count. * @param NPickerIndex The index of the given NPicker. */ private void setImeOptions(NumberPicker NPicker, int NPickerCount, int NPickerIndex) { final int imeOptions; if (NPickerIndex < NPickerCount - 1) { imeOptions = EditorInfo.IME_ACTION_NEXT; } else { imeOptions = EditorInfo.IME_ACTION_DONE; } TextView input = (TextView) NPicker .findViewById(R.id.number_picker_edit_text); input.setImeOptions(imeOptions); }
/** * Sets the IME options for a NPicker based on its ordering. * * @param NPicker The NPicker. * @param NPickerCount The total NPicker count. * @param NPickerIndex The index of the given NPicker. */ private void setImeOptions(NumberPicker NPicker, int NPickerCount, int NPickerIndex) { final int imeOptions; if (NPickerIndex < NPickerCount - 1) { imeOptions = EditorInfo.IME_ACTION_NEXT; } else { imeOptions = EditorInfo.IME_ACTION_DONE; } TextView input = (TextView) NPicker .findViewById(R.id.number_picker_edit_text); input.setImeOptions(imeOptions); }
((TextView)view).setImeOptions(options);
input.setImeOptions(imeOptions);
textView.setImeOptions(EditorInfo.IME_ACTION_DONE); }else if(options.equalsIgnoreCase("go")) { textView.setImeOptions(EditorInfo.IME_ACTION_GO); }else if(options.equalsIgnoreCase("next")) { textView.setImeOptions(EditorInfo.IME_ACTION_NEXT); }else if(options.equalsIgnoreCase("none")) { textView.setImeOptions(EditorInfo.IME_ACTION_NONE); }else if(options.equalsIgnoreCase("previous")) { textView.setImeOptions(EditorInfo.IME_ACTION_PREVIOUS); }else if(options.equalsIgnoreCase("search")) { textView.setImeOptions(EditorInfo.IME_ACTION_SEARCH); }else if(options.equalsIgnoreCase("send")) { textView.setImeOptions(EditorInfo.IME_ACTION_SEND); }else if(options.equalsIgnoreCase("unspecified")) { textView.setImeOptions(EditorInfo.IME_ACTION_UNSPECIFIED);