}
result
-_ListViewItem::AddElement(FloatRectangle& rect, int elementId, const EnrichedText* pEnrichedText, bool textSliding)
+_ListViewItem::AddElement(FloatRectangle& rect, int elementId, const EnrichedText* pEnrichedText)
{
SysTryReturn(NID_UI_CTRL, (HasElement(elementId) == false), E_INVALID_ARG, E_INVALID_ARG,
("[E_INVALID_ARG] This elementId already exists."));
element.pTextElement->pTextObject = pText;
element.pTextElement->pEnrichedText = pCloneText;
- element.pTextElement->textSlidingEnabled = textSliding;
+ element.pTextElement->textSlidingEnabled = false;
GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_NORMAL, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_NORMAL]);
GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_PRESSED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_PRESSED]);
pBitmap->pVE->SetBounds(rect);
- bool isNinePatchedBitmap = _BitmapImpl::CheckNinePatchedBitmapStrictly(*pDrawBitmap);
- String imagePath = _BitmapImpl::GetInstance(*pDrawBitmap)->GetFileName();
+ Canvas* pCanvas = pBitmap->pVE->GetCanvasN();
+ SysTryReturn(NID_UI_CTRL, (pCanvas != null), false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+ pCanvas->Clear();
- if (!isNinePatchedBitmap && !imagePath.IsEmpty())
+ if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pDrawBitmap))
{
- pBitmap->pVE->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f));
- pBitmap->pVE->SetImageSource(imagePath);
+ pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, rect.width, rect.height), *pDrawBitmap);
}
else
{
- pBitmap->pVE->SetImageSource(L"");
-
- Canvas* pCanvas = pBitmap->pVE->GetCanvasN();
- SysTryReturn(NID_UI_CTRL, (pCanvas != null), false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
- pCanvas->Clear();
-
- if (isNinePatchedBitmap)
- {
- pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, rect.width, rect.height), *pDrawBitmap);
- }
- else
- {
- pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, rect.width, rect.height), *pDrawBitmap);
- }
-
- delete pCanvas;
+ pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, rect.width, rect.height), *pDrawBitmap);
}
+ delete pCanvas;
+
return true;
}
// remove all text element in _EnrichedTextImpl
pElementText->pEnrichedText->RemoveAllTextElements(true);
+ //pTextObject->RemoveAll(true);
while (pTextLinkInfo != null)
{
result AddElement(Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Base::String& text, bool textSliding = false);
- result AddElement(Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::EnrichedText* pEnrichedText, bool textSliding = false);
+ result AddElement(Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::EnrichedText* pEnrichedText);
result AddElement(Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::Bitmap* pNormalBitmap,
const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null);