From: Amith Kumar Mahale Date: Fri, 6 Sep 2013 13:32:04 +0000 (+0530) Subject: Fix for N_SE-51371 X-Git-Tag: 2.2.1_release~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be07ff051e526841357e6b82e7445179535c5c5d;p=apps%2Fosp%2FCall.git Fix for N_SE-51371 Change-Id: Ib5ce1147c2525fcb199e33bccec2bb0382694336 Signed-off-by: Amith Kumar Mahale --- diff --git a/inc/CallIncomingCallForm.h b/inc/CallIncomingCallForm.h index 83b5169..be03675 100644 --- a/inc/CallIncomingCallForm.h +++ b/inc/CallIncomingCallForm.h @@ -76,7 +76,7 @@ public: // From 'ITableViewItemProvider' - Deletes the specified item. virtual bool DeleteItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); // From 'ITableViewItemProvider' - Updates the specified item. - virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem){}; + virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); // From 'ITableViewItemProvider' - Gets the default height of an item. virtual int GetDefaultItemHeight(void); //Handles call disconnect @@ -140,6 +140,8 @@ private: void HideRejectMessagePanel(void); //Shows reject message panel void ShowRejectMessagePanel(void); + //sets reject message panel bounds + void SetRejectMessagePanelBounds(void); private: //contact number for incoming call diff --git a/res/screen-size-normal/IDL_DTMF_KEYS_PANEL.xml b/res/screen-size-normal/IDL_DTMF_KEYS_PANEL.xml index 3d8e07a..3761fdf 100644 --- a/res/screen-size-normal/IDL_DTMF_KEYS_PANEL.xml +++ b/res/screen-size-normal/IDL_DTMF_KEYS_PANEL.xml @@ -4,70 +4,70 @@ --> - + - - + + diff --git a/src/CallActiveCallForm.cpp b/src/CallActiveCallForm.cpp index c1e68af..4b9bae6 100644 --- a/src/CallActiveCallForm.cpp +++ b/src/CallActiveCallForm.cpp @@ -199,9 +199,11 @@ ActiveCallForm::OnInitializing(void) void ActiveCallForm::ShowDTMFKeypad(void) { + EditField* pTextBox = static_cast(__pDTMFKeypad->GetControl(IDC_TEXTBOX)); __pDTMFKeypad->SetShowState(true); __pDTMFKeypad->Draw(true); __pDTMFKeypad->Show(); + pTextBox->SetFocus(); } void diff --git a/src/CallApp.cpp b/src/CallApp.cpp index e294d99..e28f6da 100644 --- a/src/CallApp.cpp +++ b/src/CallApp.cpp @@ -385,7 +385,7 @@ CallApp::HandleIncomingCallAppControlRequest(RequestId reqId,const IMap* pArgsMa { //App already initialized, goto incoming call form pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_INCOMINGCALL, SCENE_TRANSITION_ANIMATION_TYPE_NONE, - SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_KEEP), __pLaunchArgs); + SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY), __pLaunchArgs); __pLaunchArgs = null; } diff --git a/src/CallIncomingCallForm.cpp b/src/CallIncomingCallForm.cpp index cae2461..01dd005 100644 --- a/src/CallIncomingCallForm.cpp +++ b/src/CallIncomingCallForm.cpp @@ -558,25 +558,7 @@ IncomingCallForm::ShowRejectMessagePanel(void) if (pKeysPanel) { pKeysPanel->SetShowState(true); - TableView* pMessageList = static_cast(pKeysPanel->GetControl(IDC_MSG_TABLEVIEW)); - Rectangle tmpRect = pMessageList->GetBounds(); - SetControlAlwaysOnTop(*pKeysPanel,true); - - //Set Height to Reject Message Panel - int listHeight = H_LIST_NORMAL_MENU_ITEM; //If no messages - if(__pRejectMessageList != null && __pRejectMessageList->GetCount() > 0) - { - listHeight = H_LIST_NORMAL_MENU_ITEM * (__pRejectMessageList->GetCount()); //multiply by number of items - } - if (listHeight > MAX_LIST_HEIGHT) - { - listHeight = MAX_LIST_HEIGHT; - } - - pMessageList->SetBounds(tmpRect.x, tmpRect.y, tmpRect.width, listHeight); - pMessageList->UpdateTableView(); - tmpRect = pKeysPanel->GetBounds(); - pKeysPanel->SetBounds(tmpRect.x, tmpRect.y, tmpRect.width, H_MESSAGE_BG_BITMAP /*+ H_REJECT_VIEW_FOOTER*/ + listHeight); + SetRejectMessagePanelBounds(); Button* pButtonReject = static_cast(pKeysPanel->GetControl(IDC_REJECT_MESSAGE_CANCEL_BUTTON)); pButtonReject->SetActionId(IDA_CANCEL_REJECT_CALL_MESSAGE_PANEL); @@ -587,7 +569,7 @@ IncomingCallForm::ShowRejectMessagePanel(void) ShowRejectMessageFooter(); - pKeysPanel->SetFocus(); + //pKeysPanel->SetFocus(); pKeysPanel->Draw(); } Button* pButtonRejectMessage = static_cast(GetControl(IDC_REJECT_MESSAGE_BUTTON)); @@ -617,6 +599,33 @@ IncomingCallForm::HideRejectMessagePanel(void) } void +IncomingCallForm::SetRejectMessagePanelBounds(void) +{ + Panel* pKeysPanel = static_cast(GetControl(IDC_REJECT_PANEL)); + if(pKeysPanel) + { + TableView* pMessageList = static_cast(pKeysPanel->GetControl(IDC_MSG_TABLEVIEW)); + Rectangle tmpRect = pMessageList->GetBounds(); + SetControlAlwaysOnTop(*pKeysPanel,true); + //Set Height to Reject Message Panel + int listHeight = H_LIST_NORMAL_MENU_ITEM; //If no messages + if(__pRejectMessageList != null && __pRejectMessageList->GetCount() > 0) + { + listHeight = H_LIST_NORMAL_MENU_ITEM * (__pRejectMessageList->GetCount()); //multiply by number of items + } + if (listHeight > MAX_LIST_HEIGHT) + { + listHeight = MAX_LIST_HEIGHT; + } + + pMessageList->SetBounds(tmpRect.x, tmpRect.y, tmpRect.width, listHeight); + pMessageList->RefreshAllItems(); + tmpRect = pKeysPanel->GetBounds(); + pKeysPanel->SetBounds(tmpRect.x, tmpRect.y, tmpRect.width, H_MESSAGE_BG_BITMAP /*+ H_REJECT_VIEW_FOOTER*/ + listHeight); + } +} + +void IncomingCallForm::OnActionPerformed(const Control& source, int actionId) { switch (actionId) @@ -934,7 +943,8 @@ IncomingCallForm::CreateItem(int itemIndex, int itemWidth) pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL); //Message text item rectangle - Rectangle itemRect(X_LIST_TEXT_ITEM, 0, W_LIST_TEXT_ITEM, H_LIST_NORMAL_MENU_ITEM); + //Rectangle itemRect(X_LIST_TEXT_ITEM, 0, W_LIST_TEXT_ITEM, H_LIST_NORMAL_MENU_ITEM); + Rectangle itemRect(X_LIST_TEXT_ITEM, 0, itemWidth - W_SEND_BUTTON_MARGIN - W_SEND_TEXT_ITEM, H_LIST_NORMAL_MENU_ITEM); //Message String itemName(L""); @@ -999,6 +1009,23 @@ IncomingCallForm::CreateItem(int itemIndex, int itemWidth) return pItem; } +void +IncomingCallForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem) +{ + Rectangle itemRect(X_LIST_TEXT_ITEM, 0, pItem->GetWidth()- W_SEND_BUTTON_MARGIN - W_SEND_TEXT_ITEM, H_LIST_NORMAL_MENU_ITEM); + Label* pItemLbl = static_cast(pItem->GetControl(0)); + if(pItemLbl != null) + { + pItemLbl->SetBounds(itemRect); + } + Button* pSendButton = static_cast(pItem->GetControl(1)); + if(pSendButton != null) + { + pSendButton->SetBounds(Rectangle(GetClientAreaBounds().width - W_SEND_BUTTON_MARGIN -W_SEND_TEXT_ITEM, Y_SEND_TEXT_ITEM, W_SEND_TEXT_ITEM, H_SEND_TEXT_ITEM)); + } + pItem->Invalidate(true); +} + bool IncomingCallForm::DeleteItem(int itemIndex, TableViewItem* pItem) { @@ -1550,8 +1577,9 @@ IncomingCallForm::OnOrientationChanged(const Control& source, OrientationStatus Panel* pKeysPanel = static_cast(GetControl(IDC_REJECT_PANEL)); if(pKeysPanel->GetShowState() == true) { - HideRejectMessagePanel(); - ShowRejectMessagePanel(); + //HideRejectMessagePanel(); + //ShowRejectMessagePanel(); + SetRejectMessagePanelBounds(); } Button* pButtonRejectMessage = static_cast(GetControl(IDC_REJECT_MESSAGE_BUTTON));