本文整理了Java中android.widget.Spinner.setSelected()
方法的一些代码示例,展示了Spinner.setSelected()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spinner.setSelected()
方法的具体详情如下:
包路径:android.widget.Spinner
类名称:Spinner
方法名:setSelected
暂无
代码示例来源:origin: it.tidalwave.bluebill/it-tidalwave-android-utilities
/*******************************************************************************************************************
*
* Selects the proper value in a {@link Spinner}.
*
* @param values the possible values
* @param selectedValue the selected value
* @param spinner the {@code Spinner}
*
******************************************************************************************************************/
private static void select (final @Nonnull Enum<?>[] values,
final @Nonnull Object selectedValue,
final @Nonnull Spinner spinner)
{
final int index = Arrays.binarySearch(values,selectedValue);
if (index < 0)
{
spinner.setSelected(false);
}
else
{
spinner.setSelected(true);
spinner.setSelection(index);
}
}
代码示例来源:origin: stackoverflow.com
public void run() {
spinner.setSelection(position);
spinner.setSelected(true);
((MyArrayAdapter) spinner.getAdapter()).notifyDataSetChanged();
代码示例来源:origin: fesch/CanZE
deviceList.setSelected(true);
代码示例来源:origin: stackoverflow.com
mSpinner.setSelected(false);
try {
mAdapter.notify();
代码示例来源:origin: fesch/CanZE
carList.setSelected(true);
toastList.setSelected(true);
内容来源于网络,如有侵权,请联系作者删除!