private IcsSpinner createSpinner() { final IcsSpinner spinner = new IcsSpinner(getContext(), null, R.attr.actionDropDownStyle); spinner.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT)); spinner.setOnItemSelectedListener(this); return spinner; }
private IcsSpinner createSpinner() { final IcsSpinner spinner = new IcsSpinner(getContext(), null, R.attr.actionDropDownStyle); spinner.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT)); spinner.setOnItemSelectedListener(this); return spinner; }
MenuItem spinnerItem = menu.add(null); spinnerItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); IcsSpinner spinner = new IcsSpinner(this, null); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( this, R.array.items, R.layout.sherlock_spinner_item); adapter.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item); spinner.setAdapter(adapter); spinner.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); spinnerItem.setActionView(spinner);
case ActionBar.NAVIGATION_MODE_LIST: if (mSpinner == null) { mSpinner = new IcsSpinner(mContext, null, R.attr.actionDropDownStyle); mListNavLayout = (IcsLinearLayout) LayoutInflater.from(mContext)
case ActionBar.NAVIGATION_MODE_LIST: if (mSpinner == null) { mSpinner = new IcsSpinner(mContext, null, R.attr.actionDropDownStyle); mListNavLayout = (IcsLinearLayout) LayoutInflater.from(mContext)