10-07-2010 05:32 AM
I have 2 horizontal field managers each with x child fields
1. Manager 1 has 4 fileds
2. Manager 2 has 3 fields
Now i want the navigation movement as below
if i'm on manager 1 and my trackpad movement is horizontal, then my focus should be on manager 1 only and the focus should move between the 4 fields.
now if my trackpad movement is down, my focus should go on manager 2.
In short , with up down movement, i should be toglling between manager 1 and 2.
and with left right trackpad movement , my focus should be moving to the fields within the same manager.
now my problem is, when i move from manager 1 --> manager 2 in that case , the 1st fields of each manager get focus at the same time.....really strange
10-07-2010 07:53 AM
this is the problem of dirty and muddy, 2 fields can't get the focus together. u can check it by using the field change listener, only one will consume the click.
check the blackberry java docs Field Class)
Field's "cleanliness" state
A field's cleanliness state tracks when changes happen to a field. When a field's contents are changed and the field still has the focus, the field is set to be both "muddy" and "dirty" (dirty is implied by the muddy state). After the focus moves away from the field, it loses the muddy state, but remains dirty, as its contents have still been changed. Only when the field is explicitly set to the clean state (by invoking setDirty(false)) does it become clean again.
10-07-2010 08:26 AM - edited 10-07-2010 08:27 AM
Are any of the Managers or Fields involved custom (non-RIM) classes that override focus-related methods, such as setFocus, moveFocus, navigationMovement, trackwheelRoll, onFocus, onUnfocus, and the likes?
10-07-2010 01:23 PM
my problem got solved.
my manager had bitmap fields and i was changing the images for the bitmap field in the focus and unfocus method.
for focus method i was setting a focus bitmap, and unfocused bitmap for the unfocused state.
however instead if i used drawFocus , it worked