void
WallpaperAlbumListDetailForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
{
- RemoveAllControls();
- CreateHeader(L"Wallpaper Album List");
- CreateFooter();
- CreateIconListView();
+ __pIconListView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
Invalidate(true);
}
\ No newline at end of file
void
WallpaperAlbumListForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
{
- RemoveAllControls();
- CreateHeader(L"Wallpaper Album List");
- CreateFooter();
- CreateIconListView();
+ __pIconListView->SetBounds(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
Invalidate(true);
}
\ No newline at end of file
void
WallpaperImageSelectForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
{
- RemoveAllControls();
- CreateFooter();
- CreateImage();
+ Label* pLabel = static_cast<Label*>(GetControl(NO_CONTENTS, true));
+ Rectangle rect = GetClientAreaBounds();
+ ContentManager pContentManager;
+ pContentManager.Construct();
+ ImageContentInfo* pImageContentInfo = static_cast<ImageContentInfo*>(pContentManager.GetContentInfoN(*__pContentId));
+ Bitmap* pBitmap = ResourceManager::GetApplicationBitmapN(pImageContentInfo->GetContentPath());
+ Rectangle clientRect = GetClientAreaBounds();
+
+ float bitmapWidthRate = rect.width / (float)pBitmap->GetWidth();
+ float bitmapHeightRate = rect.height / (float)pBitmap->GetHeight();
+
+ int bitmapWidth = 0;
+ int bitmapHeight = 0;
+
+ if (bitmapWidthRate > bitmapHeightRate)
+ {
+ bitmapHeight = pBitmap->GetHeight() * bitmapHeightRate;
+ bitmapWidth = pBitmap->GetWidth() * bitmapHeightRate;
+ }
+ else
+ {
+ bitmapHeight = pBitmap->GetHeight() * bitmapWidthRate;
+ bitmapWidth = pBitmap->GetWidth() * bitmapWidthRate;
+ }
+ int xPos = (clientRect.width / LINE_COUNT_2) - (bitmapWidth / DEVIDE_TWO);
+ int yPos = (clientRect.height / LINE_COUNT_2) - (bitmapHeight / DEVIDE_TWO);
+ pLabel->SetBounds(Rectangle(xPos, yPos, bitmapWidth, bitmapHeight));
Invalidate(true);
}
\ No newline at end of file