Try not to do this. It will break the UI model that Android users expect on 
their phones.
However, if you really need it:

1. Modify the data items that are handled by your ListView's adapter. Add an 
field that could tell how many times a list-item has been clicked (e.g. 
numberOfClicks).

2. Handle the onItemClick(...) (or in your case 'onClick(...)') as follows:
MyDataItem item = adapter.getItem(position);
Increase the item.numberOfClicks. 
If it becomes 1: do nothing.
If it becomes 2: go to the other screen and re-set item.numberOfClicks to 0.
(Be sure to call adapter.notifyDatatSetChanged()).

3. Change the 'getView(....)' method of your ListView's adapter:
MyDataItem item = getItem(position);
If the corresponding's item.numberOfClicks is 1, then color the background 
of that item in a particular color (that would indicate a 'highlight').
If the corresponding's item.numberOfClicks is not 1, then make the 
background of that item transparent (android.R.color.transparent).


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to