Java 类android.widget.AbsSpinner 实例源码

项目:talkback    文件:AccessibilityNodeInfoUtils.java   
@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;
}
项目:itsnat_droid    文件:AttrDescView_widget_ListViewAndAbsSpinner_entries.java   
@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);
}
项目:FullRobolectricTestSample    文件:ShadowAbsSpinner.java   
@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));
  }
}
项目:SimpleMediaScanner    文件:ScheduleFragment.java   
public DailyRadioOnCheckedChangeListener(Context context,
                                         AbsSpinner hourSpinner) {
    mContext = context;
    mHourSpinner = hourSpinner;
    mEnableProc = new EnableProc();
    mDisableProc = new DisableProc();
}
项目:SimpleMediaScanner    文件:ScheduleFragment.java   
@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();
}
项目:AndroidViewHelper    文件:AbsSpinnerHelper.java   
public AbsSpinnerHelper(AbsSpinner view) {
    super(view);
}
项目:AndroidViewHelper    文件:AbsSpinnerHelper.java   
public AbsSpinner getView(){
return mView;
}
项目:AndroidViewHelper    文件:AbsSpinnerWrapper.java   
public AbsSpinnerWrapper(AbsSpinner view) {
    super(view);
    mView = view;
}
项目:AndroidViewHelper    文件:AndroidViewHelper.java   
public static AbsSpinnerHelper absSpinner(@NonNull Activity activity, @IdRes int viewId) {
    return new AbsSpinnerHelper((AbsSpinner) findView(activity, viewId));
}
项目:AndroidViewHelper    文件:AndroidViewHelper.java   
public static AbsSpinnerHelper absSpinner(@NonNull View view, @IdRes int viewId) {
    return new AbsSpinnerHelper((AbsSpinner) findView(view, viewId));
}
项目:FullRobolectricTestSample    文件:ShadowAbsSpinner.java   
@Implementation
public void setSelection(int position, boolean animate) {
  directlyOn(realAbsSpinner, AbsSpinner.class, "setSelection", int.class, boolean.class)
      .invoke(position, animate);
  animatedTransition = animate;
}
项目:12306-android-Decompile    文件:Logger.java   
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";
}
项目:12306-android-Decompile    文件:Logger.java   
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";
}
项目:assertj-android    文件:AbsSpinnerAssert.java   
public AbsSpinnerAssert(AbsSpinner actual) {
  super(actual, AbsSpinnerAssert.class);
}