Problem with Focus in ListView

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Problem with Focus in ListView

Postby bharath » Tue Dec 09, 2008 2:02 pm

Hi all,
I have modified the tutorial of [TinyTut] -Passing Data to (Sub)Activities
So in the main activity instead of Button i am showing the ListView.In the subactivity there is an
edittext.Whatever i have typed in the edittext i am appending to the ListView of the main activity.
So using getSelectedItemPosition i am able to retrieve which item i have selected in main activity.
The problem is that if i am calling another activity from main activity and then again returning to main activity
the focus is not there and also if i use getSelectedItemPosition shows -1.

how to bring focus on the selected item ?
Junior Developer
Junior Developer
Posts: 10
Joined: Sat Sep 27, 2008 11:21 am


Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests