开发者

video control display size should be of the vertical Field manager in blackberry

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


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜