Code example for Spinner

Methods: setAdapter, getSelectedView

0
		return this;
	} 
	 
	void setContent(SpinnerAdapter adapter, OnNavigationListener listener) {
		mListener = listener;
		mView.setAdapter(adapter);
		refreshSelectedItem(); 
	} 
	 
	void setSelected(int position) {
		mView.setSelection(position);
	} 
	 
	int getSelected() { 
		return mView.getSelectedItemPosition();
	} 
	 
	int getCount() { 
		return mView.getCount();
	} 
	 
	private void refreshSelectedItem() { 
		View selected = mView.getSelectedView();
		if (selected == null) {
			return; 
		} 
		selected.setActivated(mExpanded);
	}