Android Activity Set setNavigationList(Activity activity, SpinnerAdapter adapter, ActionBar.OnNavigationListener listener)

Here you can find the source of setNavigationList(Activity activity, SpinnerAdapter adapter, ActionBar.OnNavigationListener listener)

Description

set Navigation List

Declaration

public static boolean setNavigationList(Activity activity,
            SpinnerAdapter adapter, ActionBar.OnNavigationListener listener) 

Method Source Code

//package com.java2s;
import android.app.ActionBar;
import android.app.Activity;

import android.widget.SpinnerAdapter;

public class Main {
    public static boolean setNavigationList(Activity activity,
            SpinnerAdapter adapter, ActionBar.OnNavigationListener listener) {

        ActionBar actionBar = activity.getActionBar();

        if (actionBar != null) {

            actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);

            actionBar.setListNavigationCallbacks(adapter, listener);

            return true;

        }//  w  ww.  j  a  v  a  2s .c om

        return false;

    }
}

Related

  1. setDisplayHomeAsUpEnabled(Activity a, boolean enabled)
  2. setNavigationSelected(Activity activity, ArrayAdapter adapter, String selected)
  3. setDisplayHomeAsUpEnabled(Activity activity, boolean b)
  4. setDisplayHomeAsUpEnabled(Activity activity, boolean b)
  5. onCreateSetTheme(Activity activity)
  6. addView(Activity act, View v, Rect rect)