Connected by MOTOBLURâ„¢

-----Original message-----
From: David Toledo <[email protected]>
To: [email protected]
Sent: Fri, Dec 17, 2010 21:21:19 GMT+00:00
Subject: [android-developers] Re: ListView Selected

The answers is the following :)

   lv1.setOnItemClickListener(new ListView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> a, View v, int i, long l) {
            try {
                lv1.requestFocusFromTouch();
                lv1.setSelection(i);
                lv1.getSelectedView().setSelected(true);
            }
            catch(Exception e) {
                System.out.println("Nay, cannot get the selected index");
            }
        }
    });

2010/12/17 David Toledo <[email protected]>

> Hi All
>
> How to can stay HIGHLIGHTED the row selected in my ListView
>
> Thanks
> David
>

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

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

Reply via email to