android.widget.Spinner.getTag()方法的使用及代码示例

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

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

Spinner.getTag介绍

暂无

代码示例

代码示例来源:origin: M66B/XPrivacyLua

private void updateSelection() {
    XGroup selected = (XGroup) spGroup.getSelectedItem();
    String group = (selected == null ? null : selected.name);
    if (group == null ? spGroup.getTag() != null : !group.equals(spGroup.getTag())) {
      Log.i(TAG, "Select group=" + group);
      spGroup.setTag(group);
      rvAdapter.setGroup(group);
    }
    tvRestrict.setVisibility(group == null ? View.VISIBLE : View.GONE);
    btnRestrict.setVisibility(group == null ? View.INVISIBLE : View.VISIBLE);
  }
});

代码示例来源:origin: PrivacyApps/document-viewer

protected void updateAction(final Spinner view) {
  if (wrapper != null) {
    final TouchManager.Touch t = (Touch) view.getTag();
    final ActionRef ref = wrapper.r.getAction(t);
    if (ref != null) {
      final String name = ref.name;
      view.setSelection(actionsAdapter.getPosition(name));
      return;
    }
  }
  view.setSelection(0);
}

代码示例来源:origin: PrivacyApps/document-viewer

protected void updateAction(final Spinner view) {
  final KeyAction action = (KeyAction) view.getTag();
  final String name = action.action;
  if (LengthUtils.isNotEmpty(name)) {
    view.setSelection(actionsAdapter.getPosition(name));
    return;
  }
  view.setSelection(0);
}

代码示例来源:origin: proninyaroslav/libretorrent

@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l)
{
  if (((Integer)storageList.getTag()) == i)
    return;
  spinnerPos = i;
  storageList.setTag(i);
  curDir = storageAdapter.getItem(i);
  reloadData();
}

相关文章