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
danielleCoder
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon

Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

Hi all, when i add a bitmap initialised full screen to a eyelidfieldmanager, i see the bottom eyelidfield slide up over the top of the image as expected.

 

When I add a field instead which plays video initialised using

 

Field videoField = (Field) videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE,"net.rim.device.api.ui.Field");

 

The bottom eyelid only shows/slides up underneath the video field, i have checked this by setting the height of the video field 100 smaller than full height so i see the controls sliding up.

 

I really need fullscreen video with controls sliding up over the top and have been trying to get this simple solution for many many hours.

 

Please does anyone have a workaround or a reason for this?

Please use plain text.
Developer
danielleCoder
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

I am at a complete loss at to why the top and bottom fields of an eyelidfieldmanager do not appear over the top of a field which contains video.

 

I am at the stage where the eyelidfieldmanager appears correctly if i click the trackpad but a popup also appears and when i press the menu button the same happens - appears correfly but the menu is also popping up.

 

Can someone give me a suggestion please - i am not overriding anything in my screen just to be sure but i have also tried overriding the navigationmovement and setting the field visisble, but to no avail.

 

Anyone please?

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

For your main problem, try the following:

 

1. Reduce the height of the video field.

 

2. Pause the video before eyelidfield show up.

 

Regarding the second issue, it looks like the screen behaves according to the documentation.

 

What do you need it to do?

Please use plain text.
Developer
danielleCoder
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

Hi, thanks for your reply, I only have one issue, i want the videofield  to be fullscreen and i want the eye lids to be on top of the videofield when shown, currently i cant get this to work - the eyelids currently appear under the videofield, but testing with just a fullscreen bitmap the eyelids will appear over the top as expected.

 

I dont want to reduce the height of the videofield as i think it looks good when rim do it with the native video player.

 

Why would the eyelids appear over the top of the video when menu is shown but underneath the videofield when the menu is not shown/hidden again?

 

 

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

I don't know the answer to your question but I'm guessing it might have to do with a fact that a bitmap is only painted once as oppose to video or animation which is constantly repainted.

 

I don't know why it works correctly with the menu but it might be related to the fact that the screen is not in the foreground (not the first in the stack) any more.

 

Having said that, I would have try:

 

1. Pausing the video - even if it is just to check the re-painting theory.

 

2. Push a transparent screen when the eyelid managers should be displayed.

 

3. Implement my own eyelid managers for video. See this link:

http://www.blackberry.com/developers/docs/5.0.0api/javax/microedition/amms/control/imageeffect/Overl...

Note: Not seem to be an easy task...

 

E.

 

 

Please use plain text.
Developer
danielleCoder
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

Thank you for your answer.

 

It does display correctly when video is paused and also if i change the height/position of the videocontrol when navigationmovement is called then i have the eyelids showing, neither are ideal but seem to be the only for me to go, i have spent 2 days on this minor issuie so far!

 

If i wanted to listen for when the eyelidfields gets hidden so i can reset the position/height of videofield - is there a way to know when hidden?

 

 

 

If there is anyone who knows how to simply implement eyelidfieldmanager with fullscreen videofield then i would really like to know the answer.

 

 

 

 

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

Hi,

 

I think I overlooked the obvious which is to try and extend the EyelidFieldManager .

 

There is a function named onVisibilityChange which I think might suits your needs.

 

See link below:

http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/extension/container/EyelidF...

 

Hope that helps,

 

E.

Please use plain text.
Developer
danielleCoder
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

does onvisibilitychange solve the origial issue somehow or is it just to help me with the workaround of changing height/postion of videofield?

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

The onVisibilityChange is meant to help you with the workaround.

 

Functions that might help you solve your original issue are more likely to be one of: paint & setEyelidsVisible.

 

If an explict call to setEyelidsVisible won't help, I suggest overriding this function and to push a screen which will be transparent except for the two eyelids that you will have to paint on your own.

Please use plain text.
Developer
danielleCoder
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon

Re: Adding a fullscreen bitmap to eyelidfieldmanager works fine but adding videofield doesn't show controls over the top

I have spent more hours playing with onVisibilityChange and i am at the conclusion it's not reliable enough, it didnt seem to call when the eyelids were getting hidden.

 

What I have got working which is my only hope it seems is in navigationmovement..

 

   protected boolean navigationMovement(int dx, int dy, int status, int time) {
       Log.info("navmovementplayerscreen");
       try
       {
        videoControl.setDisplaySize(Display.getWidth(), Display.getHeight() - 100);
        videoControl.setDisplayLocation(0, 50);
        new Thread()
        {
            public void run()
            {
                try
        {
            Thread.sleep(3000);
            videoControl.setDisplaySize(Display.getWidth(), Display.getHeight());
        videoControl.setDisplayLocation(0, 0);
        }
        //player.prefetch();
        catch(Exception gg)
        {

        }

            }
        }.start();
        //player.start();
       }
       catch(Exception gg)
       {
           Log.info("naverror"+gg);
       }
        return super.navigationMovement(dx, dy, status, time);
    }

 

This code seems to reliably set the height of the videofield smaller so the eyelids can be seen and then when the eyelids are due to close it will reset the size of videofield to full size, it's not perfect (i found this out but carried on looking for a better solution) and might have unseen problems which i'm sure will show with more testing.

 

I'm still unpleasently surprised to find the eyelidfieldmanager doesn't work with a playing video, i would have thought they go together and would have been made to work.

 

Thanks for your help on this E. 

Please use plain text.