Reputation: 14268
I am new bea to android and want to open a list view/menu (see image:2) after click on image/button (see image:1). I am not sure whether it is list or dialog or some other component. Please help me out.
Upvotes: 3
Views: 110
Reputation: 128428
That is Drop-Down navigation for the ActionBar, you can check official documentation for the same: Adding Drop-down Navigation.
ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
actionBar.setListNavigationCallbacks(mSpinnerAdapter, mNavigationCallback);
// It takes your SpinnerAdapter and ActionBar.OnNavigationListener.
Check Examples:
To provide app compatibility for the lower Android version, I would suggest you to include actionbarsherlock library, once you will download it, you will be able to access many samples too.
Upvotes: 1
Reputation: 18978
its ActionBar.NAVIGATION_MODE_LIST
check this link Because it Working for All Android OS Version
in that many sample available for more details check this artical
Upvotes: 1
Reputation: 1385
It is a Spinner in Android. Please check below link
http://developer.android.com/guide/topics/ui/controls/spinner.html
If you want to implement behavior like GMail, then you need to override getView method of your Spinner Adapter
Upvotes: 0