Difference Between Android.r.layout.simple_spinner_dropdown_item And Android.r.layout.simple_spinner_item
Here's a sample code of using spinner in android : Spinner spinner = (Spinner) findViewById(R.id.spinner); ArrayAdapter adapter = ArrayAdapter.createFromResourc
Solution 1:
Here's is the difference - See below images
simple_spinner_item
If you're using your spinner with spinner.setAdapter(adapter);
directly in your code, your spinner will looks like above image.
But, if you're using adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
in your code, it'll show your spinner like below image where the spinner items will shown with radio buttons.
simple_spinner_dropdown_item
Solution 2:
Normally the difference between android.R.layout.simple_spinner_dropdown_item and android.R.layout.simple_spinner_item is
Simple spinner Dropdown view
Simple spinner view
Solution 3:
The difference is as below:
- simple_spinner_item is the layout of each drop-down item on the spinner list.
- And inorder to house these x number of drop-down items, the layout required is simple_spinner_dropdown_item
Post a Comment for "Difference Between Android.r.layout.simple_spinner_dropdown_item And Android.r.layout.simple_spinner_item"