Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 253
Registered: ‎08-14-2010
My Device: Not Specified

disable a manager in multi manager screen help

Hi,

 

Please refere to belove image

 

manager.png

I am using this layout of managers and dynamically change the position of "Inner Manager 02" to cover "Inner Manager 01".

 

So I need to ensure when at above state the "Inner Manager 01" to be disabled and it won't take focus at all(any controls within it too). And enure when at that state all touch events would be capture by "Inner Manager 02".

 

 

 

Could anyone provide me a direction to acheive this? any help would be highly appriciated.

 

Thanks

Developer
Posts: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Re: disable a manager in multi manager screen help

Just delete inner Manager 1?

Developer
Posts: 253
Registered: ‎08-14-2010
My Device: Not Specified

Re: disable a manager in multi manager screen help

Many thanks for your reply.

 

 The inner manager 2 is like a panel . when you click on that it moves up and cover the inner manager 1 . Then when you click again it moves down and reveal the inner manager 1. This movement is animated, so deleting the inner manager 1 will obvious to the user, ideally it should look like moving the bottom panel up by covering the top panel.

 

The outer manager is used as  host manager to control this behaviour by upadating layout(position of inner manager 2).

 

 

Is there anyother way that could acheive this beahviour?

 

Thank you in advance.

Developer
Posts: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Re: disable a manager in multi manager screen help

I missed the animation requirement in the original question.  Apologies. 

 

I have never tried updating the layout in the way you have described.  Do you find that animating in that way is smooth enough and performs well enough? 

 

Sorry I don't have an answer to your question.  I'd only be guessing.

 

I would try overriding the various interaction methods of the Manager (like focusMovement, navigationMovement etc, so that these do absolutely nothing during the animation.  You may also need to move focus if the currently focused Field is being hidden.

 

Once the animation is over I would suspect you will need to override other functions that could identify the hidden Fields, for example, getFieldAtLocation(), to make sure that only the visible Fields are selected.  I think if you do that, you should be OK.  Of course the other option is to process as follows:

a) When hiding inner Manager 1, you turn the animation flag on, which disables all input, then animate, and once the Fields are all hidden, delete them and finally turn the animation flag off again to enable input.

b) when exposing, you turn animation on, which disables all input, add the Field back, then slowly expose them and finally, when fully exposed, you turn the animation flag off again.

 

And this has just prompted another option.

 

Instead of doing things in the Outer manager, the inner Manager 1 could just update its size and slowly shrink its vertical height to nothing and then delete the Fields. And the reverse when exposing itself.  I suspect this would actually work better than updating the position in the Outer Manager. 

 

Anyway, as I said, I have never done this, this is just how I would consider doing it.  Hopefully someone else will chip in with a better option, or you will try this and it will work for you.  Please come back to us to tell us what you find. 

 

And good luck. 

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: disable a manager in multi manager screen help

You could also delete manager1 once manager2 has slid into place and then replace it before manager2 slides back off screen. Just use the insertAt function to place manager1 back below manager2.