using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
-static const int LIST_ITEM_HEIGHT = 124;
+static const int LIST_ITEM_HEIGHT = 112;
static const int H_ITEM_HEIGHT = 112;
-static const int H_TITLE_ITEM_HEIGHT = 150;
+static const int H_TITLE_ITEM_HEIGHT = 144;
static const wchar_t* IDB_LIST_LEFT_SIDE = L"ListLeftSide.png";
const int AddBookmarkForm::IDA_CREATE_BOOKMARK_FOLDER = 101;
,__titleOnViewDeactivated(L"")
, __view(L"")
,__urlOnViewDeactivated(L"")
-
+, __itemHeight(0)
+, __dropdownItemHeight(0)
{
}
{
return E_FAILURE;
}
- __pScrollPanel->SetPageScrollEnabled(true);
+ //__pScrollPanel->SetPageScrollEnabled(true);
// Title EditField added on the Scroll Panel
__pEditFieldTitle = static_cast< EditField* >(__pScrollPanel->GetControl(L"IDC_EDITFIELD1"));
ScrollPanelScrollDirection direction = __pScrollPanel->GetScrollDirection();
AppLogDebug("ScrollDirection = %d SetClientAreaHeight ret = %s value = %d autoresize = %d",direction,GetErrorMessage(r),__pScrollPanel->GetClientAreaBounds().height,__pScrollPanel->IsScrollAreaAutoResizingEnabled());
__fontSize = CommonUtil::GetFontSize();
+ __itemHeight = 112 + (__fontSize-44);
r = E_SUCCESS;
return r;
bool valid = false;
- String firstPattern(L"((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)");
+ String firstPattern(L"((ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)");
String secondPattern(L"^[A-Za-z0-9\.\+-:#@%/;$~?]+\\.[A-Za-z0-9\+-=:#@%/;$~()_?\\\.&]{2,}$"); // Url of type abc.com (i.e without protocol in front of it)
RegularExpression firstRegex;
}
else
{
- String tempUrl = L"http://";
- tempUrl.Append(Url);
+ String tempUrl;
+ if(Url.Contains("http://") == true)
+ {
+ tempUrl.Append(Url);
+ }
+ else
+ {
+ tempUrl = L"http://";
+ tempUrl.Append(Url);
+ }
- if (flag == true)
+ if(flag == true)
{
valid = true;
- Url= tempUrl ;
+ Url = tempUrl;
}
}
void
AddBookmarkForm::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
{
+ AppLog("AddBookmarkForm::OnListViewItemStateChanged listitemstatus %d for index",status,index);
if (__pEditFieldTitle != NULL)
{
__pEditFieldTitle->HideKeypad();
AppLog("AddBookmarkForm::OnListViewItemStateChanged false");
__showFolderList = true;
__pList->UpdateList();
- __listHeight = H_TITLE_ITEM_HEIGHT + (__pList->GetItemCount() -1) * H_ITEM_HEIGHT;
+ __listHeight = __dropdownItemHeight + (__pList->GetItemCount() -1) * __itemHeight;
}
else
AppLog("AddBookmarkForm::OnListViewItemStateChanged true");
__showFolderList = false;
__pList->UpdateList();
- __listHeight = H_TITLE_ITEM_HEIGHT + (__pList->GetItemCount() - 1) * H_ITEM_HEIGHT;
+ __listHeight = __dropdownItemHeight + (__pList->GetItemCount() - 1) * __itemHeight;
}
}
else
{
+ __pList->SetItemChecked(__selectedIndex,false);
+ __pList->SetItemChecked(index,true);
__selectedIndex = index;
+
if (index > 1 && __pList->GetItemCount() != index +1)
{
String parentID = "0";
{
__folderName = CommonUtil::GetString(L"IDS_BR_TAB_BOOKMARKS") ;
}
- __listHeight = H_TITLE_ITEM_HEIGHT + (__pList->GetItemCount()-1) * H_ITEM_HEIGHT;
+ __listHeight = __dropdownItemHeight + (__pList->GetItemCount()-1) * __itemHeight;
if (__pList->GetItemCount() == index +1)
{
SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_CREATE_BOOKMARK_FOLDER, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
return;
}
- __pList->UpdateList();
- // __pList->RefreshList(0, LIST_REFRESH_TYPE_ITEM_MODIFY);
+// __pList->UpdateList();//removed for issue 53372
+ __pList->RefreshList(0, LIST_REFRESH_TYPE_ITEM_MODIFY);
}
return null;
}
+ __dropdownItemHeight = 140 + (__fontSize - 44);
if ( __showFolderList == true )
{
pItem->SetCurState(DROP_DOWN_ITEM_STATE_OPENED);
if (index == 1)
{
radioItem = new(std::nothrow) RadioCustomItem();
- // r = radioItem->Construct(GetClientAreaBounds().width, LIST_ITEM_HEIGHT);
- r = radioItem->Construct(itemWidth, LIST_ITEM_HEIGHT);
+ // r = radioItem->Construct(GetClientAreaBounds().width, __itemHeight);
+ r = radioItem->Construct(itemWidth, __itemHeight);
if (IsFailed(r))
{
AppLog("Create Item Failed with error %s", GetErrorMessage(r));
folderTitle = pBookmark->GetBookmarkTitle();
}
radioItem = new(std::nothrow) RadioCustomItem();
- // r = radioItem->Construct(GetClientAreaBounds().width, LIST_ITEM_HEIGHT);
- r = radioItem->Construct(itemWidth, LIST_ITEM_HEIGHT);
+ // r = radioItem->Construct(GetClientAreaBounds().width, __itemHeight);
+ r = radioItem->Construct(itemWidth, __itemHeight);
if (IsFailed(r))
{
AppLog("Create Item Failed with error %s", GetErrorMessage(r));
else
{
radioItem = new(std::nothrow) RadioCustomItem();
- // r = radioItem->Construct(GetClientAreaBounds().width, LIST_ITEM_HEIGHT);
- r = radioItem->Construct(itemWidth, LIST_ITEM_HEIGHT);
+ // r = radioItem->Construct(GetClientAreaBounds().width, __itemHeight);
+ r = radioItem->Construct(itemWidth, __itemHeight);
if (IsFailed(r))
{
AppLog("Create Item Failed with error %s", GetErrorMessage(r));
delete pBitmap;
return null;
}
- //radioItem->AddElement(Rectangle(MARGIN_X, 0, __pList->GetBounds().width, LIST_ITEM_HEIGHT), IDA_FORMAT_STRING1, CommonUtil::GetString(L"IDS_CREATE_NEW_FOLDER"), textsize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), true);
+ //radioItem->AddElement(Rectangle(MARGIN_X, 0, __pList->GetBounds().width, itemHeight), IDA_FORMAT_STRING1, CommonUtil::GetString(L"IDS_CREATE_NEW_FOLDER"), textsize, Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_BLACK), true);
folderTitle = CommonUtil::GetString(L"IDS_BR_OPT_NEW_FOLDER");
radioItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL,ITEM_RADIO_ITEM_BACKGROUND_COLOR);
radioItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_PRESSED,ITEM_BACKGROUND_COLOR_HIGHLIGHTED);
if (pBitmap != null)
{
- //radioItem->AddElement(Rectangle(0, 0, 10, LIST_ITEM_HEIGHT), IDA_LIST_LEFT_SIDE_MARGIN, *pBitmap, null);
+ //radioItem->AddElement(Rectangle(0, 0, 10, itemHeight), IDA_LIST_LEFT_SIDE_MARGIN, *pBitmap, null);
delete pBitmap;
}
}
}
- if(__pEditFieldTitle != NULL)
- {
- __pEditFieldTitle->ShowKeypad();
- }
+// if(__pEditFieldTitle != NULL)
+// {
+// __pEditFieldTitle->ShowKeypad();
+// }
if ( previousSceneId != IDSCN_CREATE_BOOKMARK_FOLDER )
{
if (__pEditFieldTitle != NULL)
// To disable done button if either of the Title or Url field is empty
if (title.GetLength() == 0 || url.GetLength() == 0)
{
- pHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
+ pHeader->SetButtonEnabled(BUTTON_POSITION_RIGHT, false);
pHeader->Invalidate(true);
}
else
{
- pHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
+ pHeader->SetButtonEnabled(BUTTON_POSITION_RIGHT, true);
pHeader->Invalidate(true);
}
{
__pList->UpdateList();
- __listHeight = H_TITLE_ITEM_HEIGHT + (__pList->GetItemCount() - 1) * H_ITEM_HEIGHT;
+ __listHeight = __dropdownItemHeight + (__pList->GetItemCount() - 1) * __itemHeight;
__pList->SetBounds(__pList->GetX(),__pList->GetY(),__pList->GetWidth(),__listHeight);
+ AppLog("ListWidth %d",__pList->GetWidth());
}
Invalidate(true);
// To disable done button if either of the Title or Url field is empty
if (title.GetLength() == 0 || url.GetLength() == 0)
{
- pHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
+ pHeader->SetButtonEnabled(BUTTON_POSITION_RIGHT, false);
pHeader->Invalidate(true);
}
else
{
- pHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
+ pHeader->SetButtonEnabled(BUTTON_POSITION_RIGHT, true);
pHeader->Invalidate(true);
}