本文整理汇总了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;
}
示例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));
}
}
示例4: DailyRadioOnCheckedChangeListener
import android.widget.AbsSpinner; //导入依赖的package包/类
public DailyRadioOnCheckedChangeListener(Context context,
AbsSpinner hourSpinner) {
mContext = context;
mHourSpinner = hourSpinner;
mEnableProc = new EnableProc();
mDisableProc = new DisableProc();
}
示例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();
}
示例6: AbsSpinnerHelper
import android.widget.AbsSpinner; //导入依赖的package包/类
public AbsSpinnerHelper(AbsSpinner view) {
super(view);
}
示例7: getView
import android.widget.AbsSpinner; //导入依赖的package包/类
public AbsSpinner getView(){
return mView;
}
示例8: AbsSpinnerWrapper
import android.widget.AbsSpinner; //导入依赖的package包/类
public AbsSpinnerWrapper(AbsSpinner view) {
super(view);
mView = view;
}
示例9: absSpinner
import android.widget.AbsSpinner; //导入依赖的package包/类
public static AbsSpinnerHelper absSpinner(@NonNull Activity activity, @IdRes int viewId) {
return new AbsSpinnerHelper((AbsSpinner) findView(activity, viewId));
}
示例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";
}
示例11: AbsSpinnerAssert
import android.widget.AbsSpinner; //导入依赖的package包/类
public AbsSpinnerAssert(AbsSpinner actual) {
super(actual, AbsSpinnerAssert.class);
}