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: 100
Registered: ‎01-08-2009
My Device: Not Specified
Accepted Solution

Re: How do you make menu bar in picture mode disappear - bottom of screen

Hi all. I am facing an unusual issue. Whenever I click on a button on 1 screen to navigate to another screen, I find the menu bar opened on the screen reached. However, the application demands that the options menu opens when the button left to the trackball is pressed. This is only happening on those screens that are being reached after button click. On other screens I normally press the button left to the trackball to see the options menu.Am I doing something wrong? Or this is the default feature in devices using bb4.6 as I am developing an app on 4.6. I have not had the look and feel of 4.6 yet.
Regards
Akash Saxena
Blackberry Developer,
Wirkle.
Hall of Famer III
Posts: 57,553
Registered: ‎11-28-2008
My Device: PRIV (6.0.1/AAG111), Z10/Z30/Q10 (10.3.2.2813), Playbook (2.1.0.1526)
My Carrier: TMobile USA

Re: How do you make menu bar in picture mode disappear - bottom of screen


akash_wirkle wrote:
...button left to the trackball is pressed.

Trackball? Are you asking about a Storm? Because this is the Storm Forum -- and the Storm has no trackball...so I suspect you may be inquiring about a different device??



Occam's Razor nearly always applies when troubleshooting technology issues!

New to the Community? Click here and also here for helpful guidance. Also please click here for additional helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions. If anyone has been helpful to you, please show your appreciation by clicking the button. Need a reference to BB10 OS/SR versions? Click here. Need a specific BB10 AutoLoader? Send me a private message.

...................................................... ......................................................
Developer
Posts: 100
Registered: ‎01-08-2009
My Device: Not Specified

Re: How do you make menu bar in picture mode disappear - bottom of screen

Hello SDgardne, Sir I am currently working on the simulator that works for 4.6 which is Bold simulator.Presently, I do not have a 4.6 supported device. Kindly guide me accordingly. Why do the options menu open up whenever I reach a screen after clicking on a button. Thanks in advance.

Regards
Akash Saxena
Blackberry Developer,
Wirkle.
Developer
Posts: 100
Registered: ‎01-08-2009
My Device: Not Specified

Re: How do you make menu bar in picture mode disappear - bottom of screen

Sir, let me make my problem more clear to you. I dont have a device yet. I am working on Bold emulator. Whenever I click on "capture" button:

 

[IMG][/IMG]

 

 

I get the options menu on the next screen,:

 

[IMG][/IMG]

 

Everytime I have to press the Back button to reach this screen:-

[IMG][/IMG]

 

Please tell me how to reach screen 3 directly after screen1?

Thanks..

 

 

 

 

Regards
Akash Saxena
Blackberry Developer,
Wirkle.
Developer
Posts: 100
Registered: ‎01-08-2009
My Device: Not Specified

Re: How do you make menu bar in picture mode disappear - bottom of screen

private void createImageScreen(byte[] raw) {
        // Initialize the screen.
        System.out.println("Inside createImageScreen method b4 calling ImageScreen constructor....");
        System.out.println("byte raw data sent from createImageScreen fn: "+raw);
        SnapshotScreen imageScreen = new SnapshotScreen(raw);
        // Push this screen to display it to the user.
        imageScreen.showSnapshotScreen();
    }
Regards
Akash Saxena
Blackberry Developer,
Wirkle.
New Developer
Posts: 12
Registered: ‎04-08-2009
My Device: Not Specified

Re: How do you make menu bar in picture mode disappear - bottom of screen

Hi, you have to add a Button Style: ButtonField.CONSUME_CLICK is what you are looking for.
Developer
Posts: 100
Registered: ‎01-08-2009
My Device: Not Specified

Re: How do you make menu bar in picture mode disappear - bottom of screen

I am using the following code on capture button press...

_photoButton = new ButtonField("Capture");
       
        _photoButton.setChangeListener(new FieldChangeListener() {
            /**
             * When the "Capture" button is pressed, extract the image from
             * the VideoControl using getSnapshot() and push a new screen to
             * display the image to the user.
             */
            public void fieldChanged(Field field, int context) {
                try {                   
                    System.out.println("Pressing capture butn....");               
                    // Retrieve the raw image from the VideoControl and
                    // create a screen to display the image to the user.
                    System.out.println("Before transfering control to the createImageScreen method...");
                    createImageScreen(_videoControl.getSnapshot("encoding=jpeg&width=640&height=480&quality=fine"));
                }
                catch (Exception e) {
                    System.out.println("ERROR " + e.getClass() + ":  "+ e.getMessage());
                    Dialog.alert("ERROR " + e.getClass() + ":  "+ e.getMessage());
                    CnsScreen cnsScreenObject=new CnsScreen(clickPhoto);
                    cnsScreenObject.buildScreen(Constants.TYPE_MAIN_SCREEN);
                }
            }
       
        });
        

Regards
Akash Saxena
Blackberry Developer,
Wirkle.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How do you make menu bar in picture mode disappear - bottom of screen

Change:

 

_photoButton = new ButtonField("Capture" );

 

to

 

_photoButton = new ButtonField("Capture", ButtonField.CONSUME_CLICK );

Developer
Posts: 100
Registered: ‎01-08-2009
My Device: Not Specified

Re: How do you make menu bar in picture mode disappear - bottom of screen

Thank you sir, it works for me!
Regards
Akash Saxena
Blackberry Developer,
Wirkle.
Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: How do you make menu bar in picture mode disappear - bottom of screen

[ Edited ]

 We too faced this issue in Simulator while clicking through mouse. But, there is no problem while pressing ENTER key. Although when we deployed to actual device, we didn't faced any such issue.

 

Note: Please make the post which helped you solv the problem as "Accepted Solution". Post by peter_strange is applicable here for "Accepted Solution".

Message Edited by baskaraninfo on 04-15-2009 01:18 AM

Use Search. "Accept Solution" if the problem gets resolved.