网上看到的东西,整理一下。在Symbian中创建全屏的方法,总结一下:
1、覆盖system panes
这个方法主要用在传统的view架构中,当view不是全屏时,可以通过调用 CCoeControl::SetExtentToWholeScreen()方法来获 取全屏。不过应该在MyView::ConstructL中调用 ActivateL()之前调用。如下:
void CHelloWorldPlusAppView::ConstructL(const TRect& aRect)
{
// Create a window for this application view
CreateWindowL();
// Set the window size
SetRect(aRect);
// This view is a full-screen view.
SetExtentToWholeScreen();
// Activate the window, which makes it ready to be drawn
ActivateL();
}
当应用程序为skinned时是不推荐使用这个函数的(从Series60 2nd Edition向后,查看配置)。不管怎么说,全屏程序 也不需要这个设置,因此这个应该不是问题:)
2、隐藏
MEikAppUiFactory* f = CEikonEnv::Static()->AppUiFactory();
iStatusPane = f->StatusPane();
iToolBar = f->ToolBar();
if( iToolBar )
iToolBar->MakeVisible( EFalse );
if( iStatusPane )
iStatusPane->MakeVisible( EFalse );
3、这种方法有点问题(查看sdk提供的Graphics example)
iContainer = CYourContainer::NewL(AppUi()->ApplicationRect(), *this);
这样你的控件将被全屏
一般我是综合1、2种方法才能得到比较好的效果
在Symbian中创建全屏的方法
最新推荐文章于 2023-06-14 12:23:37 发布