How To Customize Spinner's Dropdown Background
I want to customize Android Spinner's Dropdown background. Not for all spinners used in the application, but only one of them. After doing some research I found this Style in the s
Solution 1:
You can use PopupMenu:
PopupMenupopup=newPopupMenu(this, someButton);
popup.getMenuInflater().inflate(R.menu.your_menu, popup.getMenu());
popup.setOnMenuItemClickListener(newPopupMenu.OnMenuItemClickListener() {
publicbooleanonMenuItemClick(MenuItem item) {
// switch your menu item and do something..returntrue;
}
});
popup.show();
After that you can customize you menu items: Android custom option menu item
Post a Comment for "How To Customize Spinner's Dropdown Background"