+ // Create empty image to avoid early renderer creation
+ Toolkit::ImageView imageView = Toolkit::ImageView::New();
+
+ // Auto-generate the Icons image URL.
+ Property::Map map;
+ std::stringstream imagePath;
+ imagePath << IMAGE_PATH_PREFIX << currentIconIndex << IMAGE_PATH_POSTFIX;
+ map[ Dali::Toolkit::ImageVisual::Property::URL ] = imagePath.str();
+
+ imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map );
+ imageView.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
+ imageView.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
+ imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ imageView.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( IMAGE_AREA, IMAGE_AREA, 1.0f ) );
+
+ return imageView;
+ }
+
+ Toolkit::Button CreateButton( const unsigned int currentIconIndex )
+ {
+ Toolkit::CheckBoxButton button = Toolkit::CheckBoxButton::New();
+ button.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
+ button.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
+ button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ button.SetProperty( Toolkit::Button::Property::SELECTED, ( currentIconIndex % 2 == 0 ) ); // Select half the button
+
+ return button;
+ }
+
+ void AddIconsToPage( Actor page, bool useTextLabel )
+ {
+ Window window = mApplication.GetWindow();
+
+ Size windowSize( window.GetSize() );
+ const float scaledHeight = windowSize.y * PAGE_SCALE_FACTOR_Y;
+ const float scaledWidth = windowSize.x * PAGE_SCALE_FACTOR_X;
+ const float PADDING = windowSize.y / 64.0f;