本文整理了Java中android.widget.TextView.setImeOptions()
方法的一些代码示例,展示了TextView.setImeOptions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setImeOptions()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:setImeOptions
暂无
代码示例来源:origin: libgdx/libgdx
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;
}
代码示例来源:origin: libgdx/libgdx
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;
}
代码示例来源:origin: drawers/SpinnerDatePicker
/**
* 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);
}
代码示例来源:origin: lany192/DateTimePicker
/**
* 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);
}
代码示例来源:origin: lany192/DateTimePicker
/**
* 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);
}
代码示例来源:origin: lany192/DateTimePicker
/**
* 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);
}
代码示例来源:origin: Tencent/RapidView
((TextView)view).setImeOptions(options);
代码示例来源:origin: stackoverflow.com
input.setImeOptions(imeOptions);
代码示例来源:origin: jelic98/dynamico
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);
内容来源于网络,如有侵权,请联系作者删除!