0

Have created n number of spinners pro grammatically. need to select spinner without clicking the spinner item. it should select only when click the button.

(ex) 50 spinners have created using loop

it should select specific spinner based on button click.

ArulKumar
  • 35
  • 9
  • 1
    You have to use separate spinner object for each. And use `spinner.setSelection(postion);` And you can set id programmatically. I think it is not needed in your case – Jyoti JK Feb 06 '18 at 04:09
  • check this https://stackoverflow.com/questions/8460680/how-can-i-assign-an-id-to-a-view-programmatically/13241629 – sajan Feb 06 '18 at 05:04

1 Answers1

1

You can select specific spinner item by,

spinner.setSelection(position);

hopes this solves your problem.

Rashiq
  • 650
  • 1
  • 9
  • 23