Android - How to get the selected item value from a spinner and put it into a string?

后端 未结 6 575
Happy的楠姐
Happy的楠姐 2020-12-31 15:28

i read many similar questions on this thread, but none of them help me... This is my code:

@Override
protected void onCreate(Bundle savedInstanceState) {
            


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-12-31 15:51

    is

    imc_met=spinner.getSelectedItem().toString();
    

    not

    imc_met=Spinner.getSelectedItem().toString();
    

提交回复
热议问题