TizenRefApp-8629 Implement VoiceCall view 69/141469/5
authorRuslan Zakharov <r.zakharov@samsung.com>
Mon, 31 Jul 2017 14:06:33 +0000 (17:06 +0300)
committerRuslan Zakharov <r.zakharov@samsung.com>
Mon, 14 Aug 2017 12:05:14 +0000 (15:05 +0300)
Added RejectMessagesList

Change-Id: I4d54ab115603ca6cfb145f74d3e682e0ed871a55

CallApp.Tizen/Call/Controls/RejectMessageList.xaml [new file with mode: 0644]
CallApp.Tizen/Call/Controls/RejectMessageList.xaml.cs [new file with mode: 0644]
CallApp.Tizen/Call/Themes/CallTheme.xaml
CallApp.Tizen/CallApp.Tizen.csproj

diff --git a/CallApp.Tizen/Call/Controls/RejectMessageList.xaml b/CallApp.Tizen/Call/Controls/RejectMessageList.xaml
new file mode 100644 (file)
index 0000000..22727a0
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
+             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+             x:Class="CallApp.Tizen.Call.Controls.RejectMessageList"
+             x:Name="This"
+             xmlns:callThemes="clr-namespace:CallApp.Tizen.Call.Themes"
+             xmlns:commonControls="clr-namespace:CallApp.Tizen.Common.Controls"
+             xmlns:commonInput="clr-namespace:CallApp.Tizen.Common.Input">
+
+    <ContentView.Resources>
+        <ResourceDictionary MergedWith="callThemes:CallTheme" />
+    </ContentView.Resources>
+
+    <ListView ItemsSource="{Binding Items, Source={x:Reference This}}">
+        <ListView.ItemTemplate>
+            <DataTemplate>
+                <ViewCell>
+                    <ContentView HeightRequest="120" BackgroundColor="{Binding NormalColor, Source={x:Reference This}}">
+                        <ContentView.Triggers>
+                            <Trigger TargetType="ContentView" Property="commonInput:GesturesInput.IsTap" Value="True">
+                                <Setter Property="BackgroundColor" Value="{Binding PressColor, Source={x:Reference This}}" />
+                            </Trigger>
+                        </ContentView.Triggers>
+
+                        <Label Margin="32,0,32,0"  HorizontalOptions="Start" VerticalOptions="Center"
+                               TextColor="{Binding TextColor, Source={x:Reference This}}" FontSize="21" Text="{Binding Message}" />
+                    </ContentView>
+                </ViewCell>
+            </DataTemplate>
+        </ListView.ItemTemplate>
+    </ListView>
+</ContentView>
\ No newline at end of file
diff --git a/CallApp.Tizen/Call/Controls/RejectMessageList.xaml.cs b/CallApp.Tizen/Call/Controls/RejectMessageList.xaml.cs
new file mode 100644 (file)
index 0000000..80e1817
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * 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 System.Collections;
+using Xamarin.Forms;
+
+namespace CallApp.Tizen.Call.Controls
+{
+    public partial class RejectMessageList : ContentView
+    {
+        public RejectMessageList()
+        {
+            InitializeComponent();
+        }
+
+        /// <summary>
+        /// Color of background
+        /// </summary>
+        public static readonly BindableProperty NormalColorProperty = BindableProperty.Create(
+            "NormalColor",
+            typeof(Color),
+            typeof(RejectMessageList),
+            Color.Transparent);
+
+        public Color NormalColor
+        {
+            get
+            {
+                return (Color)GetValue(NormalColorProperty);
+            }
+            set
+            {
+                SetValue(NormalColorProperty, value);
+            }
+        }
+
+        /// <summary>
+        /// Color of background when press
+        /// </summary>
+        public static readonly BindableProperty PressColorProperty = BindableProperty.Create(
+            "PressColor",
+            typeof(Color),
+            typeof(RejectMessageList),
+            Color.Transparent);
+
+        public Color PressColor
+        {
+            get
+            {
+                return (Color)GetValue(PressColorProperty);
+            }
+            set
+            {
+                SetValue(PressColorProperty, value);
+            }
+        }
+
+        /// <summary>
+        /// Items of list
+        /// </summary>
+        public static readonly BindableProperty ItemsProperty = BindableProperty.Create(
+            "Items",
+            typeof(IEnumerable),
+            typeof(RejectMessageList),
+            null);
+
+        public IEnumerable Items
+        {
+            get
+            {
+                return (IEnumerable)GetValue(ItemsProperty);
+            }
+            set
+            {
+                SetValue(ItemsProperty, value);
+            }
+        }
+    }
+}
index 57ceb80..fc0434f 100644 (file)
@@ -9,4 +9,7 @@
     <Color x:Key="CallButtonCircleRejectBGColor">#4DE02222</Color>
     <Color x:Key="CallButtonCircleRejectNormalColor">#FFD63131</Color>
     <Color x:Key="CallButtonCircleRejectPressColor">#FFA32626</Color>
+
+    <Color x:Key="MiniCallBGColor">#2D6E7C</Color>
+    <Color x:Key="MiniCallBGPressColor">#4C2D6E7C</Color>
 </ResourceDictionary>
\ No newline at end of file
index 7e33fe0..d84da0d 100644 (file)
@@ -58,6 +58,9 @@
     <Compile Include="Call\Controls\CallHandlingPanel.xaml.cs">
       <DependentUpon>CallHandlingPanel.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Call\Controls\RejectMessageList.xaml.cs">
+      <DependentUpon>RejectMessageList.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Call\Controls\ConferenceCallManageList.xaml.cs">
       <DependentUpon>ConferenceCallManageList.xaml</DependentUpon>
     </Compile>
       <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
     </EmbeddedResource>
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Call\Controls\RejectMessageList.xaml">
+      <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+    </EmbeddedResource>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
                Other similar extension points exist, see Microsoft.Common.targets.