// Activates this view, called by framework
void CAafAppFileBrowserView::ViewActivatedL(const TVwsViewId &/*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8 &/*aCustomMessage*/)
{
	// Set files to be displayed
	SetFileListL(iBrowserEngine->GetCurrentDirectory());

	// Set menubar and CBA
	CEikonEnv* eikonEnv = CEikonEnv::Static();
	MEikAppUiFactory* appUiFactory = eikonEnv->AppUiFactory();

	CEikMenuBar* menuBar = appUiFactory->MenuBar();
	CEikButtonGroupContainer* cba = appUiFactory->Cba();

	// If any menubar is displayed - stop displaying
	if (menuBar)
		menuBar->StopDisplayingMenuBar();

	menuBar->SetMenuTitleResourceId(R_AAF_FILEBROWSER_MENUBAR);

	cba->SetCommandSetL(R_AAF_CBA_STANDART);
	cba->DrawDeferred();

	// Bring this view to the top of windows stack
	Window().SetOrdinalPosition(0);

	// Restore listbox item selection (if it's not empty)
	if (iListBox->Model()->NumberOfItems())
		iListBox->SetCurrentItemIndex(iCurrentItemIndex);

	// Set view visible
	MakeVisible(ETrue);
}
// Activates this view, called by framework
void CAafAppCameraView::ViewActivatedL(const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)
{
	__LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() ends");

	if (!iContainer)
	{
		__LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() iContainer initialization begins");

		iContainer = CAafCameraContainer::NewL( Rect() );
		iContainer->SetContainerWindowL( *this );
		
		iContainer->ActivateL();
		__LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() iContainer initialization ends");
	}
	else
	{
		iContainer->ActivateL();
		iContainer->InitCameraL();
	}

	// Set menubar and CBA
	CEikonEnv* eikonEnv = CEikonEnv::Static();
	MEikAppUiFactory* appUiFactory = eikonEnv->AppUiFactory();


	CEikMenuBar* menuBar = appUiFactory->MenuBar();
	CEikButtonGroupContainer* cba = appUiFactory->Cba();

	// If any menubar is displayed - stop displaying
	if (menuBar)
		menuBar->StopDisplayingMenuBar();

	menuBar->SetMenuTitleResourceId(R_AAF_CAMERA_VIEW_MENUBAR);

	cba->SetCommandSetL(R_AAF_CBA_STANDART);
	cba->DrawDeferred();

	// Bring this view to the top of windows stack
	Window().SetOrdinalPosition(0);

	MakeVisible(ETrue);

	__LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() ends");
}