Code example for Spinner

Methods: getCount

0
    int getSelected() { 
        return mView.getSelectedItemPosition();
    } 
 
    int getCount() { 
        return mView.getCount();
    } 
 
    private void refreshSelectedItem() { 
        View selected = mView.getSelectedView();
        if (selected == null) {
            return; 
        } 
        selected.setActivated(mExpanded);
    } 
 
    private void createView(ViewGroup parent, TypedArray attributes) {
        mView = (Spinner) LayoutInflater.from(mContext).inflate(
                R.layout.leftnav_bar_spinner, parent, false);
        mView.setOnItemSelectedListener(new Spinner.OnItemSelectedListener() {
            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {