How to set active item in the Action Bar drop-down navigation?

I just found that function. It is setSelectedNavigationItem(int position).

Set the selected navigation item in list or tabbed navigation modes.

Example:

actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
actionBar.setListNavigationCallbacks(adapter, this);
actionBar.setSelectedNavigationItem(position);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)