How to get Spinner selected item value to string?

前端 未结 14 1967
离开以前
离开以前 2020-12-02 18:18

I have 5 Spinners. In order to make it summary to this.

This is Spinner in xml



        
14条回答
  •  不思量自难忘°
    2020-12-02 18:45

    The best way to do this is :-

    String selectedItem = spinner.getSelectedItem().toString();
    

    you can refer the docs here : Spinners

提交回复
热议问题