The way this was written, we had hundreds of identical 1x1 BitmapImages
for item checkboxes live during a scroll.
Change-Id: I0529c803476103d8fbff3f1fb88b5d6d549ccbcc
Signed-off-by: Andrew Cox <andrew.cox@partner.samsung.com>
// Set the title and icon to the current layout
SetLayoutTitle();
SetLayoutImage();
// Set the title and icon to the current layout
SetLayoutTitle();
SetLayoutImage();
+
+ // Store one 1x1 white image for multiple items to share for backgrounds:
+ mWhiteImage = BitmapImage::WHITE();
}
Actor OnKeyboardPreFocusChange( Actor current, Actor proposed, Control::KeyboardFocusNavigationDirection direction )
}
Actor OnKeyboardPreFocusChange( Actor current, Actor proposed, Control::KeyboardFocusNavigationDirection direction )
// Add a checkbox child actor; invisible until edit-mode is enabled
// Add a checkbox child actor; invisible until edit-mode is enabled
- ImageActor checkbox = ImageActor::New( BitmapImage::WHITE() );
+ ImageActor checkbox = ImageActor::New( mWhiteImage );
checkbox.SetName( "CheckBox" );
checkbox.SetColor( Vector4(0.0f,0.0f,0.0f,0.6f) );
checkbox.SetParentOrigin( ParentOrigin::TOP_RIGHT );
checkbox.SetName( "CheckBox" );
checkbox.SetColor( Vector4(0.0f,0.0f,0.0f,0.6f) );
checkbox.SetParentOrigin( ParentOrigin::TOP_RIGHT );
unsigned int mAlphaFuncIndex;
TextView mAlphaFunctionText;
unsigned int mAlphaFuncIndex;
TextView mAlphaFunctionText;
+ BitmapImage mWhiteImage;
};
void RunTest(Application& app)
};
void RunTest(Application& app)