本文整理了Java中android.widget.AutoCompleteTextView.setId()
方法的一些代码示例,展示了AutoCompleteTextView.setId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AutoCompleteTextView.setId()
方法的具体详情如下:
包路径:android.widget.AutoCompleteTextView
类名称:AutoCompleteTextView
方法名:setId
暂无
代码示例来源:origin: stackoverflow.com
mACTV.setId(android.R.id.edit);
mACTV.setText(curVal);
代码示例来源:origin: wasdennnoch/AndroidN-ify
public AutoCompleteEditTextPreference(Context context, AttributeSet attrs, int defStyleAttr,
int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
mAutoCompleteTextView = new InstantAutoCompleteTextView(context, attrs);
// Give it an ID so it can be saved/restored
mAutoCompleteTextView.setId(R.id.edit);
/*
* The preference framework and view framework both have an 'enabled'
* attribute. Most likely, the 'enabled' specified in this XML is for
* the preference framework, but it was also given to the view framework.
* We reset the enabled state.
*/
mAutoCompleteTextView.setEnabled(true);
mAutoCompleteTextView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_DONE) {
onClick(getDialog(), DialogInterface.BUTTON_POSITIVE);
getDialog().dismiss();
return true;
}
return false;
}
});
setDialogLayoutResource(R.layout.preference_dialog_autocomplete_edittext);
}
代码示例来源:origin: WowzaMediaSystems/gocoder-sdk-samples-android
vg.removeView(editText);
mAutoCompleteEditText.setId(android.R.id.edit);
内容来源于网络,如有侵权,请联系作者删除!