I have been trying to set background image in Tizen Native app but have not been successful so far. I have tried doing the same through Canvas and Bitmap but its not working,though i am not getting any error.
I am using the below code in the OnInitializing function of my form.
AppResource *pAppResource = Application::GetInstance()->GetAppResource();
Bitmap* pBitmap1 = pAppResource->GetBitmapN(L"image.png");
Canvas *pCanvas = new Canvas();
pCanvas->Construct();
pCanvas->DrawBitmap(Point(0,0), *pBitmap1);
pCanvas->Show();
Any idea what could be the issue or any other simpler way of doing the same?
Thanks,
Use GetCanvasN() method from your form.
Add a folder named "screen-density-xhigh" to the resource folder and store image to this folder that you want to set as application background. Now declare result type onDraw() function into the application header.Now implement the code bellow to the .cpp file of this form.
use OnDraw to draw the background