Search code examples
androidandroid-spinnerresource-id

Set id for spinner programmatically


It feels like I am missing something but how do you set the resource ID when making a spinner programmatically? (for example R.id.myspinner)

Thanx JP.


Solution

  • Use MySpinner.setId(int) if MySpinner is the reference to the spinner.