[android-developers] Re: Focus problem with dpad
I was able to get this working by calling:
list.setItemsCanFocus(true);
Now the button gets focus when navigating with D_PAD.
But now I face another issue.
The textview does not get highlighted when selected. Is there anyway I
can get the textview to be highlighted when focussing on it?
Kunal
On Dec 8, 11:07 am, tikky <tiku...@gmail.com> wrote:
> Hi,
> I have a a simple activity with a list view. Each element of the list
> view contains a photo, text view and a button. I have an
> onClickListener() implemented for the button.
> When I touch the button, onClickListener gets called, which is what I
> want. But when I use the D-PAD, and press down key, the entire list
> item gets focus, so the center-select key takes no effect. I need the
> focus to go only to the button instead of the entire list element, so
> that when center key is pressed, it will do the same action as in the
> touch mode.
>
> How can I achieve this?
> I have tried calling requestFocus() on the button, but still it does
> not work.
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home