android.widget.AutoCompleteTextView.setId()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中android.widget.AutoCompleteTextView.setId()方法的一些代码示例,展示了AutoCompleteTextView.setId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AutoCompleteTextView.setId()方法的具体详情如下:
包路径:android.widget.AutoCompleteTextView
类名称:AutoCompleteTextView
方法名:setId

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);

相关文章

AutoCompleteTextView类方法