本文整理汇总了Java中android.widget.AutoCompleteTextView.setRawInputType方法的典型用法代码示例。如果您正苦于以下问题:Java AutoCompleteTextView.setRawInputType方法的具体用法?Java AutoCompleteTextView.setRawInputType怎么用?Java AutoCompleteTextView.setRawInputType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.AutoCompleteTextView
的用法示例。
在下文中一共展示了AutoCompleteTextView.setRawInputType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeUi
import android.widget.AutoCompleteTextView; //导入方法依赖的package包/类
private void initializeUi() {
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
// Get the Layoutelements
mBtnConnect = (Button) findViewById(R.id.btnConnect);
mBtnConnect.setOnClickListener(oclConnect);
mBtnConnect.requestFocus();
mBtnMiamPlayer = (ImageButton) findViewById(R.id.btnMiamPlayerIcon);
mBtnMiamPlayer.setOnClickListener(oclMiamPlayer);
// Setup the animation for the MiamPlayer icon
mAlphaDown = new AlphaAnimation(1.0f, 0.3f);
mAlphaUp = new AlphaAnimation(0.3f, 1.0f);
mAlphaDown.setDuration(ANIMATION_DURATION);
mAlphaUp.setDuration(ANIMATION_DURATION);
mAlphaDown.setFillAfter(true);
mAlphaUp.setFillAfter(true);
mAlphaUp.setAnimationListener(mAnimationListener);
mAlphaDown.setAnimationListener(mAnimationListener);
mAnimationCancel = false;
// Ip and Autoconnect
mEtIp = (AutoCompleteTextView) findViewById(R.id.etIp);
mEtIp.setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
mEtIp.setThreshold(3);
// Get old ip and auto-connect from shared preferences
mEtIp.setText(mSharedPref.getString(SharedPreferencesKeys.SP_KEY_IP, ""));
mEtIp.setSelection(mEtIp.length());
ArrayAdapter<String> adapter = new ArrayAdapter<>(this,
android.R.layout.select_dialog_item, mKnownIps.toArray(new String[0]));
mEtIp.setAdapter(adapter);
// Get the last auth code
mAuthCode = mSharedPref.getInt(SharedPreferencesKeys.SP_LAST_AUTH_CODE, 0);
}