Hi all, Building with: [setup] Android SDK Tools Revision 6 [setup] Project Target: Google APIs [setup] Vendor: Google Inc. [setup] Platform Version: 2.2 [setup] API level: 8
>From here: http://developer.android.com/intl/fr/reference/android/view/ViewGroup.html#onRequestFocusInDescendants%28int,%20android.graphics.Rect%29 The documentation says that direction should be one of: FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT. >From here: http://developer.android.com/intl/fr/reference/android/view/View.html#FOCUS_FORWARD. The doc says that FOCUS_FORWARD is a value to be used with 'focusSearch(int)'. And from here: http://developer.android.com/intl/fr/reference/android/view/View.html#focusSearch%28int%29 The doc says that direction should be one of: FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT. I needed to extend Gallery as it seems to manage absolutly BAD the focus on the selected view. When I was overriding: 'onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect)' I made a debug to see which value was 'direction'. It was 2 (FOCUS_FORWARD). I was NOT calling requestFocus(int, Rect), so the view system was. After that, I made a 'focusSearch(FOCUS_FORWARD)' from a View and I get an illegal argument exception. Any ideas where that '2' came in? And why the doc says that FOCUS_FORWARD is to be used in focusSearch() in the constant details but in the method description says no. Best regards, -- If you want freedom, compile the source. Sebastián Treu http://labombiya.com.ar -- 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