From 0797616fe7ee7669df91fe8b96ed2b64e4eb78b9 Mon Sep 17 00:00:00 2001 From: Ruslan Zakharov Date: Tue, 3 Oct 2017 11:55:04 +0300 Subject: TizenRefApp-9104 Refactor ContactInformationPanel Divided on separate views and changed Grid to Stacklayout Change-Id: Ie8225a34e3f79275086bfdfb4832eff211861281 --- CallApp.Tizen/Call/View/CallView.xaml | 15 +- CallApp.Tizen/Call/View/ConferenceCallView.xaml | 7 +- .../Call/View/Controls/ActiveContactInfoPanel.xaml | 46 ++++ .../View/Controls/ActiveContactInfoPanel.xaml.cs | 29 +++ .../View/Controls/ConferenceContactInfoPanel.xaml | 28 +++ .../Controls/ConferenceContactInfoPanel.xaml.cs | 53 +++++ .../Call/View/Controls/ContactInfoPanel.xaml | 236 +-------------------- .../Call/View/Controls/ContactInfoPanel.xaml.cs | 58 +---- .../View/Controls/EmergencyContactInfoPanel.xaml | 18 ++ .../Controls/EmergencyContactInfoPanel.xaml.cs | 29 +++ .../Call/View/Controls/MergeSwapPanel.xaml | 5 +- .../Call/View/Controls/SingleContactInfoPanel.xaml | 38 ++++ .../View/Controls/SingleContactInfoPanel.xaml.cs | 29 +++ .../Call/View/Controls/TopContactInfoPanel.xaml | 50 +++++ .../Call/View/Controls/TopContactInfoPanel.xaml.cs | 53 +++++ CallApp.Tizen/Call/View/EndCallView.xaml | 5 +- CallApp.Tizen/Call/View/IncomingCallView.xaml | 7 +- CallApp.Tizen/Call/View/MiniIncomingCallView.xaml | 9 +- CallApp.Tizen/CallApp.Tizen.csproj | 44 ++++ 19 files changed, 446 insertions(+), 313 deletions(-) create mode 100644 CallApp.Tizen/Call/View/Controls/ActiveContactInfoPanel.xaml create mode 100644 CallApp.Tizen/Call/View/Controls/ActiveContactInfoPanel.xaml.cs create mode 100644 CallApp.Tizen/Call/View/Controls/ConferenceContactInfoPanel.xaml create mode 100644 CallApp.Tizen/Call/View/Controls/ConferenceContactInfoPanel.xaml.cs create mode 100644 CallApp.Tizen/Call/View/Controls/EmergencyContactInfoPanel.xaml create mode 100644 CallApp.Tizen/Call/View/Controls/EmergencyContactInfoPanel.xaml.cs create mode 100644 CallApp.Tizen/Call/View/Controls/SingleContactInfoPanel.xaml create mode 100644 CallApp.Tizen/Call/View/Controls/SingleContactInfoPanel.xaml.cs create mode 100644 CallApp.Tizen/Call/View/Controls/TopContactInfoPanel.xaml create mode 100644 CallApp.Tizen/Call/View/Controls/TopContactInfoPanel.xaml.cs diff --git a/CallApp.Tizen/Call/View/CallView.xaml b/CallApp.Tizen/Call/View/CallView.xaml index 5725889..a5c561c 100644 --- a/CallApp.Tizen/Call/View/CallView.xaml +++ b/CallApp.Tizen/Call/View/CallView.xaml @@ -10,18 +10,19 @@ - - - + + + - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CallApp.Tizen/Call/View/Controls/ActiveContactInfoPanel.xaml.cs b/CallApp.Tizen/Call/View/Controls/ActiveContactInfoPanel.xaml.cs new file mode 100644 index 0000000..823d6c1 --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/ActiveContactInfoPanel.xaml.cs @@ -0,0 +1,29 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace CallApp.Tizen.Call.View.Controls +{ + /// + /// Represents ContactInfoPanel for Active call status in mini state + /// + public partial class ActiveContactInfoPanel : ContactInfoPanel + { + public ActiveContactInfoPanel() + { + InitializeComponent(); + } + } +} diff --git a/CallApp.Tizen/Call/View/Controls/ConferenceContactInfoPanel.xaml b/CallApp.Tizen/Call/View/Controls/ConferenceContactInfoPanel.xaml new file mode 100644 index 0000000..10bec9e --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/ConferenceContactInfoPanel.xaml @@ -0,0 +1,28 @@ + + + + + + + + + + \ No newline at end of file diff --git a/CallApp.Tizen/Call/View/Controls/ConferenceContactInfoPanel.xaml.cs b/CallApp.Tizen/Call/View/Controls/ConferenceContactInfoPanel.xaml.cs new file mode 100644 index 0000000..2f604cf --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/ConferenceContactInfoPanel.xaml.cs @@ -0,0 +1,53 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using Xamarin.Forms; + +namespace CallApp.Tizen.Call.View.Controls +{ + /// + /// Represents ContactInfoPanel for Conference call status + /// + public partial class ConferenceContactInfoPanel : ContactInfoPanel + { + public ConferenceContactInfoPanel() + { + InitializeComponent(); + } + + /// + /// Сommand to binding various custom actions + /// + public static readonly BindableProperty ActionCommandProperty = BindableProperty.Create( + "ActionCommand", + typeof(Command), + typeof(ConferenceContactInfoPanel), + null); + + public Command ActionCommand + { + get + { + return (Command)GetValue(ActionCommandProperty); + } + + set + { + SetValue(ActionCommandProperty, value); + } + } + } +} diff --git a/CallApp.Tizen/Call/View/Controls/ContactInfoPanel.xaml b/CallApp.Tizen/Call/View/Controls/ContactInfoPanel.xaml index 4d9d7e7..9221bcf 100644 --- a/CallApp.Tizen/Call/View/Controls/ContactInfoPanel.xaml +++ b/CallApp.Tizen/Call/View/Controls/ContactInfoPanel.xaml @@ -1,240 +1,6 @@  + x:Class="CallApp.Tizen.Call.View.Controls.ContactInfoPanel"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CallApp.Tizen/Call/View/Controls/ContactInfoPanel.xaml.cs b/CallApp.Tizen/Call/View/Controls/ContactInfoPanel.xaml.cs index bd9f4b5..c6f30f2 100644 --- a/CallApp.Tizen/Call/View/Controls/ContactInfoPanel.xaml.cs +++ b/CallApp.Tizen/Call/View/Controls/ContactInfoPanel.xaml.cs @@ -19,71 +19,15 @@ using Xamarin.Forms; namespace CallApp.Tizen.Call.View.Controls { /// - /// Partial class of ContactInfoPanel.xaml + /// Represents base class of ContactInfoPanel /// public partial class ContactInfoPanel : ContentView { - /// - /// Layout types - /// - public enum LayoutTypes - { - Active, - Conference, - Emergency, - Single, - Top - } - public ContactInfoPanel() { InitializeComponent(); } - /// - /// Сommand to binding various custom actions - /// - public static readonly BindableProperty ActionCommandProperty = BindableProperty.Create( - "ActionCommand", - typeof(Command), - typeof(ContactInfoPanel), - null); - - public Command ActionCommand - { - get - { - return (Command)GetValue(ActionCommandProperty); - } - - set - { - SetValue(ActionCommandProperty, value); - } - } - - /// - /// Layout type of panel - /// - public static readonly BindableProperty LayoutTypeProperty = BindableProperty.Create( - "LayoutType", - typeof(LayoutTypes), - typeof(ContactInfoPanel), - LayoutTypes.Active); - - public LayoutTypes LayoutType - { - get - { - return (LayoutTypes)GetValue(LayoutTypeProperty); - } - - set - { - SetValue(LayoutTypeProperty, value); - } - } - /// /// Text of status /// diff --git a/CallApp.Tizen/Call/View/Controls/EmergencyContactInfoPanel.xaml b/CallApp.Tizen/Call/View/Controls/EmergencyContactInfoPanel.xaml new file mode 100644 index 0000000..a11bb26 --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/EmergencyContactInfoPanel.xaml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/CallApp.Tizen/Call/View/Controls/EmergencyContactInfoPanel.xaml.cs b/CallApp.Tizen/Call/View/Controls/EmergencyContactInfoPanel.xaml.cs new file mode 100644 index 0000000..c2b2130 --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/EmergencyContactInfoPanel.xaml.cs @@ -0,0 +1,29 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace CallApp.Tizen.Call.View.Controls +{ + /// + /// Represents ContactInfoPanel for Emergency call status + /// + public partial class EmergencyContactInfoPanel : ContactInfoPanel + { + public EmergencyContactInfoPanel() + { + InitializeComponent(); + } + } +} diff --git a/CallApp.Tizen/Call/View/Controls/MergeSwapPanel.xaml b/CallApp.Tizen/Call/View/Controls/MergeSwapPanel.xaml index ac1d1e3..505290b 100644 --- a/CallApp.Tizen/Call/View/Controls/MergeSwapPanel.xaml +++ b/CallApp.Tizen/Call/View/Controls/MergeSwapPanel.xaml @@ -6,8 +6,9 @@ xmlns:Localization="clr-namespace:CallApp.Tizen.Localization"> - + diff --git a/CallApp.Tizen/Call/View/Controls/SingleContactInfoPanel.xaml b/CallApp.Tizen/Call/View/Controls/SingleContactInfoPanel.xaml new file mode 100644 index 0000000..8668981 --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/SingleContactInfoPanel.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/CallApp.Tizen/Call/View/Controls/SingleContactInfoPanel.xaml.cs b/CallApp.Tizen/Call/View/Controls/SingleContactInfoPanel.xaml.cs new file mode 100644 index 0000000..f0aef8f --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/SingleContactInfoPanel.xaml.cs @@ -0,0 +1,29 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace CallApp.Tizen.Call.View.Controls +{ + /// + /// Represents ContactInfoPanel for Active, Incoming, Outgoing call statuses + /// + public partial class SingleContactInfoPanel : ContactInfoPanel + { + public SingleContactInfoPanel() + { + InitializeComponent(); + } + } +} diff --git a/CallApp.Tizen/Call/View/Controls/TopContactInfoPanel.xaml b/CallApp.Tizen/Call/View/Controls/TopContactInfoPanel.xaml new file mode 100644 index 0000000..1be4413 --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/TopContactInfoPanel.xaml @@ -0,0 +1,50 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/CallApp.Tizen/Call/View/Controls/TopContactInfoPanel.xaml.cs b/CallApp.Tizen/Call/View/Controls/TopContactInfoPanel.xaml.cs new file mode 100644 index 0000000..b24da35 --- /dev/null +++ b/CallApp.Tizen/Call/View/Controls/TopContactInfoPanel.xaml.cs @@ -0,0 +1,53 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using Xamarin.Forms; + +namespace CallApp.Tizen.Call.View.Controls +{ + /// + /// Represents ContactInfoPanel for End, Hold call statuses + /// + public partial class TopContactInfoPanel : ContactInfoPanel + { + public TopContactInfoPanel() + { + InitializeComponent(); + } + + /// + /// Сommand to binding various custom actions + /// + public static readonly BindableProperty ActionCommandProperty = BindableProperty.Create( + "ActionCommand", + typeof(Command), + typeof(TopContactInfoPanel), + null); + + public Command ActionCommand + { + get + { + return (Command)GetValue(ActionCommandProperty); + } + + set + { + SetValue(ActionCommandProperty, value); + } + } + } +} diff --git a/CallApp.Tizen/Call/View/EndCallView.xaml b/CallApp.Tizen/Call/View/EndCallView.xaml index 9e0424e..e0289a7 100644 --- a/CallApp.Tizen/Call/View/EndCallView.xaml +++ b/CallApp.Tizen/Call/View/EndCallView.xaml @@ -25,8 +25,9 @@ - + diff --git a/CallApp.Tizen/Call/View/IncomingCallView.xaml b/CallApp.Tizen/Call/View/IncomingCallView.xaml index 51b382d..1118d5d 100644 --- a/CallApp.Tizen/Call/View/IncomingCallView.xaml +++ b/CallApp.Tizen/Call/View/IncomingCallView.xaml @@ -17,9 +17,10 @@ - + diff --git a/CallApp.Tizen/Call/View/MiniIncomingCallView.xaml b/CallApp.Tizen/Call/View/MiniIncomingCallView.xaml index 633d485..4462ffd 100644 --- a/CallApp.Tizen/Call/View/MiniIncomingCallView.xaml +++ b/CallApp.Tizen/Call/View/MiniIncomingCallView.xaml @@ -17,10 +17,11 @@ - +