diff --git a/demo/dali-table-view.cpp b/demo/dali-table-view.cpp index ae21628..7b1fefb 100644 --- a/demo/dali-table-view.cpp +++ b/demo/dali-table-view.cpp @@ -17,6 +17,7 @@ // CLASS HEADER #include "dali-table-view.h" +#include "examples/shared/view.h" // EXTERNAL INCLUDES #include @@ -90,12 +91,13 @@ const Dali::PointSize TABLE_TEXT_STYLE_POINT_SIZE( 8.0f ); const Dali::TextStyle::Weight TABLE_TEXT_STYLE_WEIGHT(Dali::TextStyle::LIGHT); const Dali::Vector4 TABLE_TEXT_STYLE_COLOR(0.0f, 0.0f, 0.0f, 1.0f); + TextStyle GetDefaultTextStyle() { TextStyle textStyle; textStyle.SetFontName(DEFAULT_TEXT_STYLE_FONT_FAMILY); textStyle.SetFontStyle(DEFAULT_TEXT_STYLE_FONT_STYLE); - textStyle.SetFontPointSize(DEFAULT_TEXT_STYLE_POINT_SIZE); + textStyle.SetFontPointSize( Dali::PointSize(DemoHelper::ScalePointSize(DEFAULT_TEXT_STYLE_POINT_SIZE))); textStyle.SetWeight(DEFAULT_TEXT_STYLE_WEIGHT); textStyle.SetTextColor(DEFAULT_TEXT_STYLE_COLOR); textStyle.SetShadow( true ); @@ -107,7 +109,7 @@ TextStyle GetTableTextStyle() TextStyle textStyle; textStyle.SetFontName(TABLE_TEXT_STYLE_FONT_FAMILY); textStyle.SetFontStyle(TABLE_TEXT_STYLE_FONT_STYLE); - textStyle.SetFontPointSize(TABLE_TEXT_STYLE_POINT_SIZE); + textStyle.SetFontPointSize( Dali::PointSize(DemoHelper::ScalePointSize(TABLE_TEXT_STYLE_POINT_SIZE))); textStyle.SetWeight(TABLE_TEXT_STYLE_WEIGHT); textStyle.SetTextColor(TABLE_TEXT_STYLE_COLOR); return textStyle; @@ -285,7 +287,15 @@ void DaliTableView::Initialize( Application& application ) Stage::GetCurrent().Add( mRootActor ); // Toolbar at top - CreateToolbar( mRootActor, DEFAULT_TOOLBAR_TEXT, DEFAULT_TOOLBAR_IMAGE_PATH ); + Dali::Toolkit::ToolBar toolbar; + Dali::Layer toolBarLayer = DemoHelper::CreateToolbar(toolbar, + DEFAULT_TOOLBAR_IMAGE_PATH, + DEFAULT_TOOLBAR_TEXT, + DemoHelper::DEFAULT_VIEW_STYLE, + DemoHelper::GetDefaultTextStyle()); + + mRootActor.AddChild( toolBarLayer, TableView::CellPosition( 0, 0 ) ); + mRootActor.SetFixedHeight( 0, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight ); // Add logo mLogo = CreateLogo( LOGO_PATH ); @@ -364,61 +374,6 @@ void DaliTableView::Initialize( Application& application ) KeyboardFocusManager::Get().FocusedActorActivatedSignal().Connect( this, &DaliTableView::OnFocusedActorActivated ); } -void DaliTableView::CreateToolbar( TableView root, const std::string& title, const std::string& toolbarImagePath, - const ViewStyle& style ) -{ - // Create default ToolBar - Dali::Stage stage = Dali::Stage::GetCurrent(); - Dali::Vector2 dpi = stage.GetDpi(); - - // Create toolbar layer. - Dali::Layer toolBarLayer = Dali::Layer::New(); - toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); - toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); - toolBarLayer.ApplyConstraint( Dali::Constraint::New( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::SourceWidthFixedHeight( style.mToolBarHeight * dpi.y / style.mDpi ) ) ); - float toolBarLayerHeight = style.mToolBarHeight * dpi.y / style.mDpi; - toolBarLayer.SetSize( 0.0f, toolBarLayerHeight ); - - // Add tool bar layer to the view. - root.AddChild( toolBarLayer, TableView::CellPosition( 0, 0 ) ); - root.SetFixedHeight( 0, toolBarLayerHeight ); - - // Raise tool bar layer to the top. - toolBarLayer.RaiseToTop(); - - // Tool bar - Dali::Image image = Dali::Image::New( toolbarImagePath ); - Dali::ImageActor toolBarBackground = Dali::ImageActor::New( image ); - Dali::Toolkit::ToolBar toolBar = Dali::Toolkit::ToolBar::New(); - toolBar.SetBackground( toolBarBackground ); - toolBar.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); - toolBar.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); - toolBar.ApplyConstraint( Dali::Constraint::New( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::EqualToConstraint() ) ); - toolBar.SetSize( 0.0f, style.mToolBarHeight * dpi.y / style.mDpi ); - toolBarBackground.SetZ( -1.0f ); - - // Add the tool bar to the too bar layer. - toolBarLayer.Add( toolBar ); - - Dali::Font font = Dali::Font::New(); - - // Tool bar text. - if( !title.empty() ) - { - Dali::Toolkit::TextView titleActor = Dali::Toolkit::TextView::New(); - titleActor.SetName( "ToolbarTitle" ); - titleActor.SetText( title ); - titleActor.SetSize( font.MeasureText( title ) ); - titleActor.SetStyleToCurrentText( GetDefaultTextStyle() ); - titleActor.SetZ( 1.0f ); - - // Add title to the tool bar. - const float padding( style.mToolBarPadding * dpi.x / style.mDpi ); - toolBar.AddControl( titleActor, style.mToolBarTitlePercentage, Dali::Toolkit::Alignment::HorizontalCenter, - Dali::Toolkit::Alignment::Padding( padding, padding, padding, padding ) ); - } -} - void DaliTableView::Populate() { const Vector2 stageSize = Stage::GetCurrent().GetSize(); @@ -898,7 +853,6 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BitmapImage dis Random::Range( -size.y * 0.5f - randSize, size.y * 0.5f + randSize ), Random::Range(-1.0f, 0.0f) ); dfActor.SetPosition( actorPos ); - dfActor.SetSortModifier(size.x * 0.7f); Constraint movementConstraint = Constraint::New < Vector3 > ( Actor::POSITION, LocalSource( Actor::SIZE ), diff --git a/demo/dali-table-view.h b/demo/dali-table-view.h index e8df815..08746ea 100644 --- a/demo/dali-table-view.h +++ b/demo/dali-table-view.h @@ -72,27 +72,7 @@ struct Example std::string title; ///< title (caption) of example to appear on tile button. }; -/** - * Provide a style for the view and its tool bar. - */ -struct ViewStyle -{ - ViewStyle( float toolBarButtonPercentage, float toolBarTitlePercentage, float dpi, float toolBarHeight, float toolBarPadding ) - : mToolBarButtonPercentage( toolBarButtonPercentage ), - mToolBarTitlePercentage( toolBarTitlePercentage ), - mDpi( dpi ), - mToolBarHeight( toolBarHeight ), - mToolBarPadding( toolBarPadding ) - {} - - float mToolBarButtonPercentage; ///< The tool bar button width is a percentage of the tool bar width. - float mToolBarTitlePercentage; ///< The tool bar title width is a percentage of the tool bar width. - float mDpi; ///< This style is indented for the given dpi. - float mToolBarHeight; ///< The tool bar height for the given dpi above. - float mToolBarPadding; ///< The tool bar padding between controls for the given dpi above. -}; -const ViewStyle DEFAULT_VIEW_STYLE( 0.1f, 0.7f, 315.f, 80.f, 4.f ); /** * Dali-Demo instance @@ -276,11 +256,6 @@ private: // Application callbacks & implementation void ApplyEffectToTileContent(Dali::Actor tileContent); /** - * Create a toolbar - */ - void CreateToolbar(Dali::Toolkit::TableView root, const std::string& title, const std::string& toolbarImagePath, const ViewStyle& style = DEFAULT_VIEW_STYLE); - - /** * Key event handler */ void OnKeyEvent( const Dali::KeyEvent& event ); diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp index 4e02c7b..9e23170 100644 --- a/examples/builder/examples.cpp +++ b/examples/builder/examples.cpp @@ -404,7 +404,14 @@ public: { TextView t = TextView::New(); t.SetMarkupProcessingEnabled(true); - t.SetText( std::string("") + ShortName( text ) + std::string("") ); + + int size = static_cast(DemoHelper::ScalePointSize(6)); + + std::ostringstream fontString; + fontString << ""<< ShortName( text ) << ""; + + t.SetText( fontString.str() ); + t.SetTextAlignment( Alignment::HorizontalLeft ); return t; } diff --git a/examples/cluster/cluster-example.cpp b/examples/cluster/cluster-example.cpp index 186f502..cf107d9 100644 --- a/examples/cluster/cluster-example.cpp +++ b/examples/cluster/cluster-example.cpp @@ -127,11 +127,8 @@ const float CLUSTER_RELATIVE_SIZE = 0.65f; ///< Cluster size re const float CLUSTER_GROUP_DELAY_TOP = 0.25f; ///< Delay for top Clusters in seconds. const float CLUSTER_GROUP_DELAY_BOTTOM = 0.0f; ///< Delay for bottom Clusters in seconds. -const float CLUSTER_COLUMN_SPACING = 1.0f; ///< Spacing in screen coordinates. const float CLUSTER_COLUMN_INDENT = 0.1f; ///< Left Indentation in screen coordinates. -const float CLUSTER_ROW_SPACING = 0.42f; ///< Spacing in screen coordinates. const float CLUSTER_ROW_INDENT = 0.13f; ///< Top Indentation in screen coordinates. -const float CLUSTER_BOTTOM_SHIFT = 0.15f; ///< Bottom row is shifted right by 15% of screen width. const Vector3 SHEAR_EFFECT_ANCHOR_POINT(0.5f, 1.0f, 0.5f); ///< Anchor Point used for the shear effect (extends outside of Cluster) const float SHEAR_EFFECT_MAX_OVERSHOOT = 30.0f; ///< Max Overshoot for shear effect (in degrees). @@ -557,7 +554,8 @@ public: clusterActor.SetAnchorPoint(AnchorPoint::CENTER); Vector2 stageSize = Dali::Stage::GetCurrent().GetSize(); - clusterActor.SetSize(stageSize.x * CLUSTER_RELATIVE_SIZE, stageSize.x * CLUSTER_RELATIVE_SIZE, 0.0f); + float minStageDimension = min(stageSize.x, stageSize.y); + clusterActor.SetSize(minStageDimension * CLUSTER_RELATIVE_SIZE, minStageDimension * CLUSTER_RELATIVE_SIZE, 0.0f); DALI_ASSERT_ALWAYS(clusterType < CLUSTER_COUNT); const char **paths = IMAGE_GROUPS[clusterType]; @@ -650,8 +648,11 @@ public: int column = mClusterCount>>1; int row = mClusterCount&1; - Vector3 clusterPosition = Vector3((CLUSTER_COLUMN_INDENT + row * CLUSTER_BOTTOM_SHIFT) * stageSize.width, - (row * CLUSTER_ROW_SPACING + CLUSTER_ROW_INDENT) * stageSize.height, 0.0f); + + float minStageDimension = min(stageSize.x, stageSize.y); + float clusterRightShift = 1.0f - CLUSTER_COLUMN_INDENT * 2.0f; + Vector3 clusterPosition = Vector3(CLUSTER_COLUMN_INDENT * stageSize.width + row * (clusterRightShift * stageSize.width - minStageDimension * CLUSTER_RELATIVE_SIZE), + CLUSTER_ROW_INDENT * stageSize.height + row * (clusterRightShift * stageSize.height - minStageDimension * CLUSTER_RELATIVE_SIZE), 0.0f); Actor pageView = Actor::New(); mScrollView.Add(pageView); diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index f6f1198..6ab5e50 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -246,9 +246,9 @@ public: */ void OnInit(Application& app) { - Stage::GetCurrent().KeyEventSignal().Connect(this, &ItemViewExample::OnKeyEvent); - Stage stage = Dali::Stage::GetCurrent(); + stage.KeyEventSignal().Connect(this, &ItemViewExample::OnKeyEvent); + Vector2 stageSize = Stage::GetCurrent().GetSize(); // Create a border image shared by all the item actors @@ -265,9 +265,6 @@ public: mView.OrientationAnimationStartedSignal().Connect( this, &ItemViewExample::OnOrientationChanged ); - // Set the title to the current layout - SetLayoutTitle(); - // Create an edit mode button. (left of toolbar) Toolkit::PushButton editButton = Toolkit::PushButton::New(); editButton.SetBackgroundImage( Image::New( EDIT_IMAGE ) ); @@ -281,7 +278,6 @@ public: mLayoutButton.ClickedSignal().Connect( this, &ItemViewExample::OnLayoutButtonClicked); mLayoutButton.SetLeaveRequired( true ); mToolBar.AddControl( mLayoutButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); - SetLayoutImage(); // Create a delete button (bottom right of screen) mDeleteButton = Toolkit::PushButton::New(); @@ -347,10 +343,13 @@ public: mItemView.SetMinimumSwipeSpeed(MIN_SWIPE_SPEED); // Activate the spiral layout - Vector3 size(stage.GetSize()); - mItemView.ActivateLayout(mCurrentLayout, size, 0.0f/*immediate*/); + UseLayout(mCurrentLayout, 0.0f); mItemView.SetKeyboardFocusable( true ); KeyboardFocusManager::Get().PreFocusChangeSignal().Connect( this, &ItemViewExample::OnKeyboardPreFocusChange ); + + // Set the title and icon to the current layout + SetLayoutTitle(); + SetLayoutImage(); } Actor OnKeyboardPreFocusChange( Actor current, Actor proposed, Control::KeyboardFocusNavigationDirection direction ) @@ -366,7 +365,7 @@ public: /** * Switch to a different item view layout */ - void UseLayout(int layoutId) + void UseLayout(int layoutId, float duration) { // Set the new orientation to the layout mItemView.GetLayout(layoutId)->SetOrientation(static_cast(mOrientation / 90)); @@ -375,15 +374,7 @@ public: if(layoutId == SPIRAL_LAYOUT) { - // Set up the spiral layout according to the new orientation - if(Toolkit::IsVertical(mSpiralLayout->GetOrientation())) - { - mSpiralLayout->SetRevolutionDistance(stageSize.y / SPIRAL_LAYOUT_REVOLUTION_NUMBER_PORTRAIT); - } - else - { - mSpiralLayout->SetRevolutionDistance(stageSize.x / SPIRAL_LAYOUT_REVOLUTION_NUMBER_LANDSCAPE); - } + mSpiralLayout->SetRevolutionDistance(stageSize.height / Stage::GetCurrent().GetDpi().y * 45.0f); } if(layoutId == GRID_LAYOUT) @@ -422,7 +413,7 @@ public: mItemView.SetAnchoring(layoutId == DEPTH_LAYOUT); // Activate the layout - mItemView.ActivateLayout(layoutId, Vector3(stageSize.x, stageSize.y, stageSize.x), mDurationSeconds); + mItemView.ActivateLayout(layoutId, Vector3(stageSize.x, stageSize.y, stageSize.x), duration); } /** @@ -439,7 +430,7 @@ public: // Remember orientation mOrientation = angle; - UseLayout(mCurrentLayout); + UseLayout(mCurrentLayout, mDurationSeconds); } } @@ -448,7 +439,7 @@ public: // Switch to the next layout mCurrentLayout = (mCurrentLayout + 1) % mItemView.GetLayoutCount(); - UseLayout(mCurrentLayout); + UseLayout(mCurrentLayout, mDurationSeconds); SetLayoutTitle(); SetLayoutImage(); diff --git a/examples/motion/motion-blur-example.cpp b/examples/motion/motion-blur-example.cpp index b120d2a..b10334c 100644 --- a/examples/motion/motion-blur-example.cpp +++ b/examples/motion/motion-blur-example.cpp @@ -147,7 +147,7 @@ public: mToolBar, BACKGROUND_IMAGE_PATH, TOOLBAR_IMAGE, - APPLICATION_TITLE); + APPLICATION_TITLE ); //Add an effects icon on the right of the title mIconEffectsOff = Image::New( EFFECTS_OFF_ICON ); diff --git a/examples/motion/motion-stretch-example.cpp b/examples/motion/motion-stretch-example.cpp index 2a054f5..3ff484e 100644 --- a/examples/motion/motion-stretch-example.cpp +++ b/examples/motion/motion-stretch-example.cpp @@ -134,7 +134,7 @@ public: mToolBar, BACKGROUND_IMAGE_PATH, TOOLBAR_IMAGE, - APPLICATION_TITLE); + APPLICATION_TITLE ); //Add an slideshow icon on the right of the title mIconEffectsOff = Image::New( EFFECTS_OFF_ICON ); diff --git a/examples/radial-menu/radial-menu-example.cpp b/examples/radial-menu/radial-menu-example.cpp index b422746..50ac16b 100644 --- a/examples/radial-menu/radial-menu-example.cpp +++ b/examples/radial-menu/radial-menu-example.cpp @@ -121,8 +121,10 @@ RadialMenuExample::~RadialMenuExample() void RadialMenuExample::OnInit(Application& app) { + Stage stage = Dali::Stage::GetCurrent(); + // The Init signal is received once (only) during the Application lifetime - Stage::GetCurrent().KeyEventSignal().Connect(this, &RadialMenuExample::OnKeyEvent); + stage.KeyEventSignal().Connect(this, &RadialMenuExample::OnKeyEvent); // Create toolbar & view Toolkit::ToolBar toolBar; @@ -146,7 +148,14 @@ void RadialMenuExample::OnInit(Application& app) DemoHelper::DEFAULT_PLAY_PADDING ); Vector2 imgSize = Image::GetImageSize(TEST_OUTER_RING_FILENAME); - float scale = Stage::GetCurrent().GetSize().width / imgSize.width; + Vector2 stageSize = stage.GetSize(); + float minStageDimension = std::min(stageSize.width, stageSize.height); + + if(stageSize.height <= stageSize.width) + { + minStageDimension -= DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight * 2.0f; + } + float scale = minStageDimension / imgSize.width; mRadialSweepView1 = CreateSweepView( TEST_OUTER_RING_FILENAME, Degree(-90.0f), Degree(-90.0f)); mRadialSweepView2 = CreateSweepView( TEST_INNER_RING_FILENAME, Degree(90.0f), Degree(0.0f)); @@ -162,7 +171,7 @@ void RadialMenuExample::OnInit(Application& app) dialLayer.Add(mDialActor); dialLayer.SetPositionInheritanceMode(USE_PARENT_POSITION); - dialLayer.SetSize(Stage::GetCurrent().GetSize()); + dialLayer.SetSize(stage.GetSize()); mContents.Add(dialLayer); mRadialSweepView1.SetScale(scale); diff --git a/examples/scroll-view/scroll-view-example.cpp b/examples/scroll-view/scroll-view-example.cpp index 979038f..cad9691 100644 --- a/examples/scroll-view/scroll-view-example.cpp +++ b/examples/scroll-view/scroll-view-example.cpp @@ -121,7 +121,6 @@ const char * const GetNextImagePath() const int PAGE_COLUMNS = 10; ///< Number of Pages going across (columns) const int PAGE_ROWS = 1; ///< Number of Pages going down (rows) -const int IMAGE_COLUMNS = 3; ///< Number of Images going across (columns) within a Page const int IMAGE_ROWS = 5; ///< Number of Images going down (rows) with a Page // 3D Effect constants @@ -184,14 +183,14 @@ public: */ void OnInit(Application& app) { - Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); + Stage stage = Dali::Stage::GetCurrent(); + stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); // Hide the indicator bar mApplication.GetWindow().ShowIndicator(Dali::Window::INVISIBLE); // Creates a default view with a default tool bar. // The view is added to the stage. - mContentLayer = DemoHelper::CreateView( app, mView, mToolBar, @@ -313,11 +312,13 @@ private: const float margin = 10.0f; - const Vector3 imageSize((stageSize.x / IMAGE_COLUMNS) - margin, (stageSize.y / IMAGE_ROWS) - margin, 0.0f); + // Calculate the number of images going across (columns) within a page, according to the screen resolution and dpi. + int imageColumns = round(IMAGE_ROWS * (stageSize.x / stage.GetDpi().x) / (stageSize.y / stage.GetDpi().y)); + const Vector3 imageSize((stageSize.x / imageColumns) - margin, (stageSize.y / IMAGE_ROWS) - margin, 0.0f); for(int row = 0;row( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::SourceWidthFixedHeight( style.mToolBarHeight * dpi.y / style.mDpi ) ) ); - toolBarLayer.SetSize( 0.0f, style.mToolBarHeight * dpi.y / style.mDpi ); - - // Add tool bar layer to the view. - view.AddContentLayer( toolBarLayer ); + toolBarLayer.ApplyConstraint( Dali::Constraint::New( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::SourceWidthFixedHeight( style.mToolBarHeight ) ) ); + toolBarLayer.SetSize( 0.0f, style.mToolBarHeight ); // Raise tool bar layer to the top. toolBarLayer.RaiseToTop(); @@ -126,7 +100,7 @@ Dali::Layer CreateView( Dali::Application& application, toolBar.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); toolBar.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); toolBar.ApplyConstraint( Dali::Constraint::New( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::EqualToConstraint() ) ); - toolBar.SetSize( 0.0f, style.mToolBarHeight * dpi.y / style.mDpi ); + toolBar.SetSize( 0.0f, style.mToolBarHeight ); toolBarBackground.SetSortModifier(1.0f); // Add the tool bar to the too bar layer. @@ -144,10 +118,50 @@ Dali::Layer CreateView( Dali::Application& application, titleActor.SetStyleToCurrentText(textStyle); // Add title to the tool bar. - const float padding( style.mToolBarPadding * dpi.x / style.mDpi ); + const float padding( style.mToolBarPadding ); toolBar.AddControl( titleActor, style.mToolBarTitlePercentage, Dali::Toolkit::Alignment::HorizontalCenter, Dali::Toolkit::Alignment::Padding( padding, padding, padding, padding ) ); } + return toolBarLayer; +} + +Dali::Layer CreateView( Dali::Application& application, + Dali::Toolkit::View& view, + Dali::Toolkit::ToolBar& toolBar, + const std::string& backgroundImagePath, + const std::string& toolbarImagePath, + const std::string& title, + const ViewStyle& style, + const Dali::TextStyle& textStyle ) +{ + Dali::Stage stage = Dali::Stage::GetCurrent(); + + // Create default View. + view = Dali::Toolkit::View::New(); + + // Add the view to the stage before setting the background. + stage.Add( view ); + + // Set background image. + if ( ! backgroundImagePath.empty() ) + { + Dali::Image backgroundImage = Dali::Image::New( backgroundImagePath ); + Dali::ImageActor backgroundImageActor = Dali::ImageActor::New( backgroundImage ); + view.SetBackground( backgroundImageActor ); + } + + // FIXME + // Connects the orientation signal with the View::OrientationChanged method. + //application.GetOrientation().ChangedSignal().Connect( &view, &Dali::Toolkit::View::OrientationChanged ); + + // Create default ToolBar + Dali::Layer toolBarLayer = CreateToolbar( toolBar, toolbarImagePath, title, style, textStyle ); + + // Add tool bar layer to the view. + view.AddContentLayer( toolBarLayer ); + + + // Create a content layer. Dali::Layer contentLayer = Dali::Layer::New(); contentLayer.SetAnchorPoint( Dali::AnchorPoint::CENTER );