How do I specify for a spinner in Android an extra padding on top/bottom of the first/last item? See sample of Goolge below (8 dp spacing).
Spinner does not support multiple view types.Issue.
I suggested you using dialog for showing your list.
Edited
according to your comment resolved your problem with this question
You need to create a custom adapter for you Spinner
using your custom layout. Thus, you just need to provide a layout with the proper margin/paddins.
Spinner spinner = (Spinner) findViewById(R.id.myspinner); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.data, R.layout.spinner_item); adapter.setDropDownViewResource(R.layout.spinner_dropdown_item); spinner.setAdapter(adapter);
You can find a valid example here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With