Hello!
I just have encountered a strange situation with my UI application.
I'm developing a UI application with design elements made as a separate PNG files. Thus, I made a form with UI builder, this form contains buttons. Then I set those buttons NormalBackgroundBitmap and PressedBackgroundBitmaps properties with my PNG's in UI builder. Next, I tried to change this properties form runtime with a code such as
Bitmap* pBitmap = null; Image* pImage = new Image(); String fullname(Tizen::App::Application::GetInstance()->GetAppResourcePath()+L"Bitmap/somepng.png"); pImage->Construct(); if(fullname.EndsWith(L"png")) { pBitmap = pImage->DecodeN(fullname, BITMAP_PIXEL_FORMAT_ARGB8888); } pButton->SetNormalBackgroundBitmap(*pBitmap);
And it fails. No errors in log, but the button behavior is like i set a fully transparent PNG, and no button redraw happened.
After some time spent on this I found that:
1. If I load an image with code such as
pBitmap=pAppResource->GetBitmapN(L"somepng.png")
with the same PNG file (placed by the appropriate path, of course), it works fine, and
2. If I do not set PNG's for a properties in UI builder, it also works fine.
Tried different PNG's including taken from SDK samples, result same.
Could somebody explain this? Or it's simply a bug I found in SDK?
Thanks in advance.