视频控制显示尺寸应为黑莓中的垂直现场管理器
我是黑莓新手 最近我正在开发一个相机应用程序 其中在方法中初始化相机 我正在使用视频控制对象来初始化相机 我使用的代码如下: 私有无效初始化相机() {
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());
}
}
在实现这样的代码时,我得到了默认视频控件大小的图像 但我希望控制器应该占据整个大小 垂直字段管理器
甚至使用代码: “_videoControl.setDisplaySize(460,320);” 控制器无法占据如图所示的大小,
所以任何人都可以在这方面帮助
我 平克什·古普塔
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在主屏幕构造函数中提供
MainScreen.USE_ALL_WIDTH|MainScreen.USE_ALL_HEIGHT
标志。查看黑莓对此有何评论
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