本文整理了Java中android.widget.AutoCompleteTextView.dismissDropDown()
方法的一些代码示例,展示了AutoCompleteTextView.dismissDropDown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AutoCompleteTextView.dismissDropDown()
方法的具体详情如下:
包路径:android.widget.AutoCompleteTextView
类名称:AutoCompleteTextView
方法名:dismissDropDown
暂无
代码示例来源:origin: rey5137/material
/**
* <p>Closes the drop down if present on screen.</p>
* <p>Only work when autoComplete mode is {@link #AUTOCOMPLETE_MODE_SINGLE} or {@link #AUTOCOMPLETE_MODE_MULTI}</p>
*/
public void dismissDropDown() {
if(mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE)
return;
((AutoCompleteTextView)mInputView).dismissDropDown();
}
代码示例来源:origin: stackoverflow.com
AutoCompleteTextView queryTextView = findQueryTextView(searchView);
if (queryTextView != null) {
queryTextView.dismissDropDown();
}
代码示例来源:origin: pchauhan/AutoCompleteEditTextWithContact
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Contact_Object contactObject = customer ;
String number = contactObject.mobileNumber ;
mAutoCompleteTextView.setText(viewHolder.tvName.getText());
mAutoCompleteTextView.dismissDropDown();
mEdtPhoneNumber.setText(PhoneNumberUtils.formatNumber(number));
}
});
代码示例来源:origin: openmrs/openmrs-contrib-android-client
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (edcountry.getText().length() >= edcountry.getThreshold()) {
edcountry.showDropDown();
}
if (Arrays.asList(countries).contains(edcountry.getText().toString())) {
edcountry.dismissDropDown();
}
}
});
代码示例来源:origin: stackoverflow.com
//set auto complete
final AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.edit_ip);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, getResources().getStringArray(R.array.myarray));
textView.setAdapter(adapter);
//set spinner
final Spinner spinner = (Spinner) findViewById(R.id.spinner_ip);
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
textView.setText(spinner.getSelectedItem().toString());
textView.dismissDropDown();
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
textView.setText(spinner.getSelectedItem().toString());
textView.dismissDropDown();
}
});
代码示例来源:origin: Calsign/APDE
@Override
public void afterTextChanged(Editable arg0) {
keystorePassword.setText("");
alias.setEnabled(false);
aliasAdapter.clear();
aliasAdapter.add(context.getResources().getString(R.string.export_signed_package_no_aliases));
aliasPassword.setEnabled(false);
aliasPassword.setText("");
aliasCertificateInfo.setEnabled(false);
aliasNew.setEnabled(false);
ValidationResult result = validateKeystoreFile();
if (result.resultCode() == 0) {
keystorePassword.setEnabled(true);
//Hide the dropdown
keystoreFile.dismissDropDown();
messageView(exportMessage, ValidationResult.MessageSeverity.INFO, R.string.export_signed_package_info_enter_keystore_password);
} else {
keystorePassword.setEnabled(false);
messageView(exportMessage, result);
}
}
代码示例来源:origin: Calsign/APDE
keystoreFile.dismissDropDown();
内容来源于网络,如有侵权,请联系作者删除!