Reputation: 15744
I could not find a way to set spinnerMode in codebehind. Spinner sets it's spinnerMode property automatically as dialog by default theme. How do I set it while I'm creating a new spinner on code behind?
Upvotes: 0
Views: 3895
Reputation: 21
Spinner spinner = new Spinner(this.Context, SpinnerMode.Dialog);
Upvotes: 2
Reputation: 131
in android >= 3.0 (API 11) you can use this :
Spinner spinner = new Spinner(this,null,android.R.style.Widget_Spinner,Spinner.MODE_DROPDOWN);
Upvotes: 3