I have to get the line number on the item selected in my spinner when i click on the save button. i need the line number not the text.
uni = universite.getSelectedItem().toString();
this code is selecting text. I am saving id in my database. so i need the line number.
CodePudding user response:
Try using this, it will give your the position of selected item
universite.getSelectedItemPosition()