Other than using listeners, is there any way by which i can get index of an item in the list?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using ‘getCheckedItemPosition’ dont forget to set the choice mode to single in order to ensure only one item can be selected at a time.
ie via
getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);And to answer your question : yes , this can be used without a listener.