How to customize focus navigation in a ViewGroup

by n179911 » Wed, 29 Jul 2009 10:29:33 GMT


Sponsored Links
 Hi,

I have a View Group and it has 2 focusable Views as its children.
I would like know how I can customize how focus is being passed
between these 2 Views. In other words, when I press the Down Key or
the Up Key in the emulator, i want to control which of these children
has focus.

I read the JavaDoc of ViewGroup, I see these 2 methods.

public View focusSearch (View focused, int direction)
public boolean requestFocus (int direction, Rect previouslyFocusedRect)

But I am confused which of these method I should over-ride to achieve
what I want.

Thank you for any advice.

Regards,

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. RTC_WAKEUP

I thought that the intention for the RTC_WAKEUP alarm was to wake up a
sleeping or powered off device. I was a bit surprised to find out that
it was not only the Alarm Clock application that registered RTC_WAKEUP
alarms, but also the Calendar does this to drive its synchronization.
I assume the GMail application uses the same technique.

This means that I cannot use RTC_WAKEUP alarms on my hardware to
program an RTC to power on a device on an alarm. Because if I did it
would also power up the device when a synchronization activity is
scheduled, the device would stay powered up, the battery power would
eventually be exhausted, possibly long before the alarm set in the
Alarm Clock app is reached.

Is this the intended behaviour, or am I assuming to much that the
intention for Android was to support alarms to power up a device and
sound an alarm as many classic feature phones have supported almost
since time immemorial? If this wasn't intended then there needs to be
a new RTC category of alarms that does power up the device, and only
alarms set in the Alarm Clock or a Calendar event with a reminder can
trigger it.

TIA

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. How to add my own menu item into the already existing menu in the sms application

Here is an example and you probably can make it to work with SMS.

    http://www.anddev.org/viewtopic.php?p=25639

--
Jack Ha
Open Source Development Center
obilestick together
The coverage you need at the price you want

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.





--~--~---------~--~----~------------~-------~--~----~

3. Syurtype dictionary Indonesia

4. Low Battery Warning

5. How to see user comments from multiple languages

6. Views right of long SingeLine Textviews disappear

7. Views right of long SingeLine Textviews disappear