0

i am new to blackberry recently i am working on a camera application in which in the method initialize camera i am using the videocontrol object to initialize the camera and the code which i used is as follows: private void initializeCamera() {

      try
        {
            // Create a player for the Blackberry's camera
            Player player = Manager.createPlayer( "capture://video" );
            // Set the player to the REALIZED state (see Player javadoc)
            player.realize();
            _videoControl = (VideoControl)player.getControl( "VideoControl" );

            if (_videoControl != null)
            {

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

                _videoControl.setDisplaySize(460,320 );

                _videoControl.setVisible(true);


            }
         player.start();




        }
        catch(Exception e)
        {
            Camera.errorDialog("ERROR " + e.getClass() + ":  " + e.getMessage());
        }
    }

on implementing such a code i got an image of the default video control size but i want that the controller should occupy the enitre size of the vertical field manager

even on using the code: "_videoControl.setDisplaySize(460,320 );" the controller is not able to occupy the size as shown

so can anybody help me in this regard

regards Pinkesh Gupta

1 Answer 1

0

You must provide the flags MainScreen.USE_ALL_WIDTH|MainScreen.USE_ALL_HEIGHT in your main screen constructor. Check out what blackberry says about this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.