开发者

Blackberry Java: Removing a ListField after it was clicked on, strange behaviour

开发者 https://www.devze.com 2023-03-14 19:44 出处:网络
I have an application that makes use of the ListFi开发者_高级运维eld component. As items are clicked on in the ListField, I remove the ListField from the manager and add in other managers.

I have an application that makes use of the ListFi开发者_高级运维eld component. As items are clicked on in the ListField, I remove the ListField from the manager and add in other managers.

My problem is that the click "event" is being passed to other fields that automatically get focus as a result of the ListField has been removed. So far my only away around this has been to make those controls unfocasable during the time I am switching out components.

Is there a neater way of doing this, having to make all my controls unfocasable for this small time seems like a bit of a hack. Any suggestions welcome.

Note: in my ListField's navigationClick method I am returning True.


You can also try Manager.replace. Remember to prepare both fields before that: remove listeners from old field, add listeners to new field.


What about changing the order of events:

  1. Add new managers.
  2. Set focus where you want it to go.
  3. Remove old manager.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号