当前位置: 首页>>代码示例>>Java>>正文


Java AbsSpinner类代码示例

本文整理汇总了Java中android.widget.AbsSpinner的典型用法代码示例。如果您正苦于以下问题:Java AbsSpinner类的具体用法?Java AbsSpinner怎么用?Java AbsSpinner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AbsSpinner类属于android.widget包,在下文中一共展示了AbsSpinner类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: accept

import android.widget.AbsSpinner; //导入依赖的package包/类
@Override
public boolean accept(AccessibilityNodeInfoCompat node) {
    if (node.isScrollable()) {
        return nodeMatchesAnyClassByType(node,
                AbsListView.class, AbsSpinner.class, ScrollView.class,
                HorizontalScrollView.class, CLASS_TOUCHWIZ_TWABSLISTVIEW) ||
                nodeMatchesClassByName(node, CLASS_RECYCLER_VIEW_CLASS_NAME);
    }

    return false;
}
 
开发者ID:google,项目名称:talkback,代码行数:12,代码来源:AccessibilityNodeInfoUtils.java

示例2: setAttribute

import android.widget.AbsSpinner; //导入依赖的package包/类
@Override
public void setAttribute(View view, DOMAttr attr, AttrLayoutContext attrCtx)
{
    CharSequence[] entries = getTextArray(attr.getResourceDesc(),attrCtx.getXMLInflaterContext());

    ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(attrCtx.getContext(), android.R.layout.simple_list_item_1, entries);
    if (view instanceof ListView)
        ((ListView)view).setAdapter(adapter);
    else if (view instanceof AbsSpinner)
        ((AbsSpinner)view).setAdapter(adapter);
}
 
开发者ID:jmarranz,项目名称:itsnat_droid,代码行数:12,代码来源:AttrDescView_widget_ListViewAndAbsSpinner_entries.java

示例3: setSelection

import android.widget.AbsSpinner; //导入依赖的package包/类
@Implementation
public void setSelection(int position) {
  directlyOn(realAbsSpinner, AbsSpinner.class, "setSelection", int.class).invoke(position);
  SpinnerAdapter adapter = realAbsSpinner.getAdapter();
  if (getItemSelectedListener() != null && adapter != null) {
    getItemSelectedListener().onItemSelected(realAbsSpinner, null, position, adapter.getItemId(position));
  }
}
 
开发者ID:qx,项目名称:FullRobolectricTestSample,代码行数:9,代码来源:ShadowAbsSpinner.java

示例4: DailyRadioOnCheckedChangeListener

import android.widget.AbsSpinner; //导入依赖的package包/类
public DailyRadioOnCheckedChangeListener(Context context,
                                         AbsSpinner hourSpinner) {
    mContext = context;
    mHourSpinner = hourSpinner;
    mEnableProc = new EnableProc();
    mDisableProc = new DisableProc();
}
 
开发者ID:SumiTomohiko,项目名称:SimpleMediaScanner,代码行数:8,代码来源:ScheduleFragment.java

示例5: onCreateDialog

import android.widget.AbsSpinner; //导入依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Context context = getActivity();
    mHourAdapter = makeIntegerAdapter(context, 24);

    String name = Context.LAYOUT_INFLATER_SERVICE;
    Object service = context.getSystemService(name);
    LayoutInflater inflater = (LayoutInflater)service;
    View view = inflater.inflate(R.layout.fragment_schedule, null);
    mHourSpinner = (AbsSpinner)view.findViewById(R.id.hour_spinner);
    mHourSpinner.setAdapter(mHourAdapter);
    mMinuteSpinner = (AbsSpinner)view.findViewById(R.id.minute_spinner);
    initializeSpinner(context, mMinuteSpinner, 60);
    mDailyRadio = (CompoundButton)view.findViewById(R.id.daily_radio);
    mDailyRadio.setChecked(true);
    CompoundButton.OnCheckedChangeListener l;
    l = new DailyRadioOnCheckedChangeListener(context, mHourSpinner);
    mDailyRadio.setOnCheckedChangeListener(l);

    AlertDialog.Builder builder = new AlertDialog.Builder(context);
    builder.setNegativeButton(R.string.negative,
                              new NegativeButtonOnClickListener());
    builder.setPositiveButton(R.string.positive,
                              new PositiveButtonOnClickListener());
    builder.setTitle("New schedule");
    builder.setView(view);

    return builder.create();
}
 
开发者ID:SumiTomohiko,项目名称:SimpleMediaScanner,代码行数:30,代码来源:ScheduleFragment.java

示例6: AbsSpinnerHelper

import android.widget.AbsSpinner; //导入依赖的package包/类
public AbsSpinnerHelper(AbsSpinner view) {
    super(view);
}
 
开发者ID:AnthZh,项目名称:AndroidViewHelper,代码行数:4,代码来源:AbsSpinnerHelper.java

示例7: getView

import android.widget.AbsSpinner; //导入依赖的package包/类
public AbsSpinner getView(){
return mView;
}
 
开发者ID:AnthZh,项目名称:AndroidViewHelper,代码行数:4,代码来源:AbsSpinnerHelper.java

示例8: AbsSpinnerWrapper

import android.widget.AbsSpinner; //导入依赖的package包/类
public AbsSpinnerWrapper(AbsSpinner view) {
    super(view);
    mView = view;
}
 
开发者ID:AnthZh,项目名称:AndroidViewHelper,代码行数:5,代码来源:AbsSpinnerWrapper.java

示例9: absSpinner

import android.widget.AbsSpinner; //导入依赖的package包/类
public static AbsSpinnerHelper absSpinner(@NonNull Activity activity, @IdRes int viewId) {
    return new AbsSpinnerHelper((AbsSpinner) findView(activity, viewId));
}
 
开发者ID:AnthZh,项目名称:AndroidViewHelper,代码行数:4,代码来源:AndroidViewHelper.java

示例10: getTlType

import android.widget.AbsSpinner; //导入依赖的package包/类
private String getTlType(Object paramObject)
{
  String str = "";
  if ((paramObject instanceof ToggleButton))
    str = "toggleButton";
  do
  {
    return str;
    if ((paramObject instanceof RadioButton))
      return "radioButton";
    if ((paramObject instanceof CheckBox))
      return "checkBox";
    if ((paramObject instanceof Button))
      return "button";
    if ((paramObject instanceof DatePicker))
      return "datePicker";
    if ((paramObject instanceof Scroller))
      return "scroll";
    if ((paramObject instanceof HorizontalScrollView))
      return "scroll";
    if ((paramObject instanceof ScrollView))
      return "scroll";
    if ((paramObject instanceof DialerFilter))
      return "dialerFilter";
    if ((paramObject instanceof ProgressBar))
      return "slider";
    if ((paramObject instanceof RadioGroup))
      return "radioButton";
    if ((paramObject instanceof Gallery))
      return "gallery";
    if ((paramObject instanceof AbsSpinner))
      return "selectList";
    if ((paramObject instanceof TabHost))
      return "tabContainer";
    if ((paramObject instanceof TabWidget))
      return "tabBar";
    if ((paramObject instanceof TextView))
      return "textBox";
    if ((paramObject instanceof TimePicker))
      return "timePicker";
    if ((paramObject instanceof Canvas))
      return "view";
    if ((paramObject instanceof ImageSwitcher))
      return "imageSwitcher";
    if ((paramObject instanceof Activity))
      return "page";
    if ((paramObject instanceof TabHost.TabSpec))
      return "tabBarItem";
  }
  while (!(paramObject instanceof WebView));
  return "webView";
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:53,代码来源:Logger.java

示例11: AbsSpinnerAssert

import android.widget.AbsSpinner; //导入依赖的package包/类
public AbsSpinnerAssert(AbsSpinner actual) {
  super(actual, AbsSpinnerAssert.class);
}
 
开发者ID:square,项目名称:assertj-android,代码行数:4,代码来源:AbsSpinnerAssert.java


注:本文中的android.widget.AbsSpinner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。