--- /dev/null
+<?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.ContactInformationPanel"
+ x:Name="This"
+ xmlns:callThemes="clr-namespace:CallApp.Tizen.Call.Themes"
+ xmlns:commonControls="clr-namespace:CallApp.Tizen.Common.Controls">
+
+ <ContentView.Resources>
+ <ResourceDictionary MergedWith="callThemes:CallTheme">
+ <ControlTemplate x:Key="EndPanel">
+ <commonControls:CustomGrid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="232" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="24" />
+ <RowDefinition Height="54" />
+ <RowDefinition Height="242" />
+ </Grid.RowDefinitions>
+
+ <Label Grid.Column="0" Grid.Row="1" Margin="32,0,0,0" HorizontalOptions="Start" VerticalOptions="Center"
+ TextColor="{StaticResource CallDefaultTextColor}" FontSize="27" Text="{TemplateBinding StatusText}" />
+
+ <Image Grid.Column="0" Grid.Row="2" Margin="32,0,32,0" WidthRequest="168" HeightRequest="168"
+ HorizontalOptions="Center" VerticalOptions="Center" Source="{TemplateBinding Image}" />
+
+ <commonControls:CustomGrid Grid.Column="1" Grid.Row="2">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="50" />
+ <RowDefinition Height="76" />
+ <RowDefinition Height="6" />
+ <RowDefinition Height="46" />
+ </Grid.RowDefinitions>
+
+ <Label Grid.Row="1" HorizontalOptions="Start" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="38" Text="{TemplateBinding PrimaryText}" />
+
+ <Label Grid.Row="3" HorizontalOptions="Start" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="23" Text="{TemplateBinding SecondaryText}" />
+ </commonControls:CustomGrid>
+ </commonControls:CustomGrid>
+ </ControlTemplate>
+
+ <ControlTemplate x:Key="MiniPanel">
+ <commonControls:CustomGrid HeightRequest="172">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="160" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <RelativeLayout Grid.Column="0" HorizontalOptions="Center" VerticalOptions="Center">
+ <Image x:Name="xPhoto" WidthRequest="96" HeightRequest="96"
+ HorizontalOptions="Center" VerticalOptions="Center" Source="{TemplateBinding Image}" />
+
+ <Image Source="call_active_ic_call.png"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=xPhoto, Property=X, Constant=55}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=xPhoto, Property=Y, Constant=55}" />
+ </RelativeLayout>
+
+ <StackLayout Grid.Column="1" VerticalOptions="Center">
+ <Label HeightRequest="43" HorizontalOptions="Start" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="21" Text="{TemplateBinding StatusText}" />
+
+ <Label HeightRequest="53" HorizontalOptions="Start" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="26" Text="{TemplateBinding PrimaryText}" />
+
+ <Label HeightRequest="43" HorizontalOptions="Start" VerticalOptions="Center"
+ TextColor="{StaticResource CallDefaultTextColor}" FontSize="21" Text="{TemplateBinding SecondaryText}"
+ IsVisible="False" />
+ </StackLayout>
+ </commonControls:CustomGrid>
+ </ControlTemplate>
+
+ <ControlTemplate x:Key="MultiplePanel">
+ <commonControls:CustomGrid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="104" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="104" />
+ </Grid.ColumnDefinitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <commonControls:CustomGrid Grid.Column="1" Grid.Row="0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="24" />
+ <RowDefinition Height="54" />
+ <RowDefinition Height="33" />
+ <RowDefinition Height="348" />
+ </Grid.RowDefinitions>
+
+ <Label Grid.Row="1" HorizontalOptions="Start" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="27" Text="{TemplateBinding StatusText}" />
+
+ <Image Grid.Row="3" HorizontalOptions="Center" VerticalOptions="Center" Source="{TemplateBinding Image}" />
+ </commonControls:CustomGrid>
+
+ <commonControls:CustomGrid Grid.Column="1" Grid.Row="1">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="42" />
+ <RowDefinition Height="86" />
+ <RowDefinition Height="8" />
+ <RowDefinition Height="54" />
+ <RowDefinition Height="63" />
+ </Grid.RowDefinitions>
+
+ <Label Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="47" Text="{TemplateBinding PrimaryText}" />
+
+ <Label Grid.Row="3" HorizontalOptions="Center" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="27" Text="{TemplateBinding SecondaryText}" />
+ </commonControls:CustomGrid>
+
+ <Image Grid.Column="2" Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center" Source="call_multi_ic_arrow.png" />
+ </commonControls:CustomGrid>
+ </ControlTemplate>
+
+ <ControlTemplate x:Key="SinglePanel">
+ <commonControls:CustomGrid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="32" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="32" />
+ </Grid.ColumnDefinitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="24" />
+ <RowDefinition Height="54" />
+ <RowDefinition Height="33" />
+ <RowDefinition Height="348" />
+ <RowDefinition Height="42" />
+ <RowDefinition Height="86" />
+ <RowDefinition Height="8" />
+ <RowDefinition Height="54" />
+ <RowDefinition Height="63" />
+ </Grid.RowDefinitions>
+
+ <Label Grid.Column="1" Grid.Row="1" HorizontalOptions="Start" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="27" Text="{TemplateBinding StatusText}" />
+
+ <Image Grid.Column="1" Grid.Row="3" HorizontalOptions="Center" VerticalOptions="Center" Source="{TemplateBinding Image}" />
+
+ <Label Grid.Column="1" Grid.Row="5" HorizontalOptions="Center" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="47" Text="{TemplateBinding PrimaryText}" />
+
+ <Label Grid.Column="1" Grid.Row="7" HorizontalOptions="Center" VerticalOptions="Center" TextColor="{StaticResource CallDefaultTextColor}"
+ FontSize="27" Text="{TemplateBinding SecondaryText}" />
+ </commonControls:CustomGrid>
+ </ControlTemplate>
+ </ResourceDictionary>
+ </ContentView.Resources>
+
+ <ContentView.Triggers>
+ <DataTrigger TargetType="ContentView" Binding="{Binding Source={x:Reference This}, Path=LayoutType}" Value="End">
+ <Setter Property="ControlTemplate" Value="{StaticResource EndPanel}" />
+ </DataTrigger>
+
+ <DataTrigger TargetType="ContentView" Binding="{Binding Source={x:Reference This}, Path=LayoutType}" Value="Mini">
+ <Setter Property="ControlTemplate" Value="{StaticResource MiniPanel}" />
+ </DataTrigger>
+
+ <DataTrigger TargetType="ContentView" Binding="{Binding Source={x:Reference This}, Path=LayoutType}" Value="Multiple">
+ <Setter Property="ControlTemplate" Value="{StaticResource MultiplePanel}" />
+ </DataTrigger>
+
+ <DataTrigger TargetType="ContentView" Binding="{Binding Source={x:Reference This}, Path=LayoutType}" Value="Single">
+ <Setter Property="ControlTemplate" Value="{StaticResource SinglePanel}" />
+ </DataTrigger>
+ </ContentView.Triggers>
+</ContentView>
\ No newline at end of file
--- /dev/null
+/*
+ * 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.Controls
+{
+ public partial class ContactInformationPanel : ContentView
+ {
+ /// <summary>
+ /// Layout types
+ /// </summary>
+ public enum LayoutTypes
+ {
+ End,
+ Mini,
+ Multiple,
+ Single
+ }
+
+ public ContactInformationPanel()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Layout type of panel
+ /// </summary>
+ public static readonly BindableProperty LayoutTypeProperty = BindableProperty.Create(
+ "LayoutType",
+ typeof(LayoutTypes),
+ typeof(ContactInformationPanel),
+ LayoutTypes.Single);
+
+ public LayoutTypes LayoutType
+ {
+ get
+ {
+ return (LayoutTypes)GetValue(LayoutTypeProperty);
+ }
+ set
+ {
+ SetValue(LayoutTypeProperty, value);
+ }
+ }
+
+ /// <summary>
+ /// Text of status
+ /// </summary>
+ public static readonly BindableProperty StatusTextProperty = BindableProperty.Create(
+ "StatusText",
+ typeof(string),
+ typeof(ContactInformationPanel),
+ string.Empty);
+
+ public string StatusText
+ {
+ get
+ {
+ return (string)GetValue(StatusTextProperty);
+ }
+ set
+ {
+ SetValue(StatusTextProperty, value);
+ }
+ }
+
+ /// <summary>
+ /// Image, may be photo of contact for example
+ /// </summary>
+ public static readonly BindableProperty ImageProperty = BindableProperty.Create(
+ "Image",
+ typeof(ImageSource),
+ typeof(ContactInformationPanel),
+ null);
+
+ public ImageSource Image
+ {
+ get
+ {
+ return (ImageSource)GetValue(ImageProperty);
+ }
+ set
+ {
+ SetValue(ImageProperty, value);
+ }
+ }
+
+ /// <summary>
+ /// Primary text, may be name of contact for example
+ /// </summary>
+ public static readonly BindableProperty PrimaryTextProperty = BindableProperty.Create(
+ "PrimaryText",
+ typeof(string),
+ typeof(ContactInformationPanel),
+ string.Empty);
+
+ public string PrimaryText
+ {
+ get
+ {
+ return (string)GetValue(PrimaryTextProperty);
+ }
+ set
+ {
+ SetValue(PrimaryTextProperty, value);
+ }
+ }
+
+ /// <summary>
+ /// Secondary text, may be phone number of contact for example
+ /// </summary>
+ public static readonly BindableProperty SecondaryTextProperty = BindableProperty.Create(
+ "SecondaryText",
+ typeof(string),
+ typeof(ContactInformationPanel),
+ string.Empty);
+
+ public string SecondaryText
+ {
+ get
+ {
+ return (string)GetValue(SecondaryTextProperty);
+ }
+ set
+ {
+ SetValue(SecondaryTextProperty, value);
+ }
+ }
+ }
+}
<Compile Include="Call\Controls\CallHandlingPanel.xaml.cs">
<DependentUpon>CallHandlingPanel.xaml</DependentUpon>
</Compile>
+ <Compile Include="Call\Controls\ContactInformationPanel.xaml.cs">
+ <DependentUpon>ContactInformationPanel.xaml</DependentUpon>
+ </Compile>
<Compile Include="Call\Controls\FlatButton.xaml.cs">
<DependentUpon>FlatButton.xaml</DependentUpon>
</Compile>
<Folder Include="lib\" />
</ItemGroup>
<ItemGroup>
+ <Content Include="res\Call ID\168x168\call_end_photo_id_default.png" />
<Content Include="res\Call ID\348x348\call_photo_id.png" />
+ <Content Include="res\Call ID\348x348\call_photo_id_conference.png" />
+ <Content Include="res\Call ID\96x96\call_photo_id_conference.png" />
<Content Include="res\call_active_ic_call.png" />
<Content Include="res\call_btn_addcall.png" />
<Content Include="res\call_btn_bluetooth.png" />
<Content Include="res\call_btn_contacts.png" />
- <Content Include="res\call_btn_ic_accept.png" />
<Content Include="res\call_btn_ic_reject.png" />
<Content Include="res\call_btn_keypad.png" />
<Content Include="res\call_btn_mute.png" />
<Content Include="res\call_btn_volume.png" />
<Content Include="res\call_button_bg_accept_reject.png" />
- <Content Include="res\call_end_ic_call.png" />
- <Content Include="res\call_end_message.png" />
<Content Include="res\call_inline_btn_close.png" />
<Content Include="res\call_inline_btn_open.png" />
<Content Include="res\call_lock_icon.png" />
- <Content Include="res\core_button_add.png" />
+ <Content Include="res\call_multi_ic_arrow.png" />
<Content Include="shared\res\icon.png" />
</ItemGroup>
<ItemGroup>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Call\Controls\ContactInformationPanel.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.