problems with focus on listview

Put your problem here if it does not fit any of the other categories.

problems with focus on listview

Postby agent00 » Tue Mar 11, 2008 5:55 pm

Hi everybody,

I'have some problems with handling focus on listview. As you know, when user press up/down (or right/left) button the focus will change to another list item (see the attached picture).

My question is the following, how can I set the focus on a list item when user touch (click) it ?

I tried with the "requestFocus()", "setFocusable()" and "setFocusableOnTouch()" but nothing is working.

The problem seems to be liked of the fact that is a custom view (IconifiedText made with anddev tutorial).

Somebody can help me ?

Thanks in advance

Regards, Agent00
Attachments
device.png
screen capture of the listview
device.png (32.49 KiB) Viewed 13716 times
agent00
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jan 18, 2008 4:23 pm

Top

Postby agent00 » Thu Mar 13, 2008 3:05 pm

Hi everybody, I update my question !

In fact it is not a focus problem but more a selection problem. It seems that when we do something in a listView, the list has the focus and the orange background is liked to the selection of the list but I don't know how to set the selection on a click event.

Somebody knows ?

Thanks,

Regards, Agent00
agent00
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jan 18, 2008 4:23 pm

Postby agent00 » Thu Mar 13, 2008 7:45 pm

I found the following thing

setting selection of a listview is easy ( ListView.setSelection(int row) ) but the problem is that when I set the selected item, the view keep his aspect and it must change is background with the selector and turn his text color into black (with dark theme).

Somebody knows if a method that make it exists ?

Thanks
agent00
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jan 18, 2008 4:23 pm

Listview focus and selection

Postby radhika » Sat May 24, 2008 10:39 am

Hi All,

Am having a datepicker above my listview. This is the customized listview as given in the Iconified listview.
But am not getting the focus in the listview nor am able to change the focus using up/down keys.

But if there is no datepicker above the listview then it works fine.

I tried making the datepicker focus false. and all other focus and select methods.
Didnt work.
Anybody found the solution to this. Please share.
Thank you
Regards
radhika
Desire to learn
radhika
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed May 14, 2008 8:09 am
Location: India

Postby arams » Fri Aug 14, 2009 10:05 am

any idea to solve this problem?...Thanks
arams
Experienced Developer
Experienced Developer
 
Posts: 89
Joined: Fri May 08, 2009 7:45 am

Postby Sowmya » Fri Aug 14, 2009 1:22 pm

Sowmya
Experienced Developer
Experienced Developer
 
Posts: 51
Joined: Fri Mar 06, 2009 7:49 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 12 guests