summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Zakharov <r.zakharov@samsung.com>2017-10-26 12:43:48 +0300
committerRuslan Zakharov <r.zakharov@samsung.com>2017-11-22 13:32:54 +0200
commit3e223b46aabea1dbe5a05a7ac45c660381a0994a (patch)
tree0392a571c6ca6dcac9e7ca293db049da8f443a5c
parent1b25913f95d1587af2941894525d27264639ce23 (diff)
downloadphone-contacts-tizen.tar.gz
phone-contacts-tizen.tar.bz2
phone-contacts-tizen.zip
TizenRefApp-9527 Implement Keypad subpagetizen
Implemented Keypad page, added empty Logs and Contacts pages Change-Id: I0db907c0f9cefa547b870d5b2ba9e25dcd6efb5c
-rw-r--r--ContactsApp.Tizen/Contacts/View/ContactsPage.xaml24
-rw-r--r--ContactsApp.Tizen/Contacts/View/ContactsPage.xaml.cs31
-rw-r--r--ContactsApp.Tizen/ContactsApp.Tizen.csproj32
-rw-r--r--ContactsApp.Tizen/Keypad/View/Controls/Keypad.xaml106
-rw-r--r--ContactsApp.Tizen/Keypad/View/Controls/Keypad.xaml.cs46
-rw-r--r--ContactsApp.Tizen/Keypad/View/Controls/KeypadButton.xaml48
-rw-r--r--ContactsApp.Tizen/Keypad/View/Controls/KeypadButton.xaml.cs62
-rw-r--r--ContactsApp.Tizen/Keypad/View/KeypadPage.xaml52
-rw-r--r--ContactsApp.Tizen/Keypad/View/KeypadPage.xaml.cs53
-rw-r--r--ContactsApp.Tizen/Keypad/ViewModel/KeypadViewModel.cs24
-rw-r--r--ContactsApp.Tizen/Logs/View/LogsPage.xaml24
-rw-r--r--ContactsApp.Tizen/Logs/View/LogsPage.xaml.cs31
-rw-r--r--ContactsApp.Tizen/MainPage.xaml14
-rw-r--r--ContactsApp.Tizen/MainPage.xaml.cs5
14 files changed, 547 insertions, 5 deletions
diff --git a/ContactsApp.Tizen/Contacts/View/ContactsPage.xaml b/ContactsApp.Tizen/Contacts/View/ContactsPage.xaml
new file mode 100644
index 0000000..5f71837
--- /dev/null
+++ b/ContactsApp.Tizen/Contacts/View/ContactsPage.xaml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+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.
+-->
+
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="ContactsApp.Tizen.Contacts.View.ContactsPage"
+ xmlns:Localization="clr-namespace:ContactsApp.Tizen.Localization"
+ Title="{x:Static Localization:Localization.TitleContacts}">
+
+</ContentPage> \ No newline at end of file
diff --git a/ContactsApp.Tizen/Contacts/View/ContactsPage.xaml.cs b/ContactsApp.Tizen/Contacts/View/ContactsPage.xaml.cs
new file mode 100644
index 0000000..f44ce05
--- /dev/null
+++ b/ContactsApp.Tizen/Contacts/View/ContactsPage.xaml.cs
@@ -0,0 +1,31 @@
+/*
+ * 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 ContactsApp.Tizen.Contacts.View
+{
+ /// <summary>
+ /// Represents Contacts page
+ /// </summary>
+ public partial class ContactsPage : ContentPage
+ {
+ public ContactsPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ContactsApp.Tizen/ContactsApp.Tizen.csproj b/ContactsApp.Tizen/ContactsApp.Tizen.csproj
index e5fec8c..f3ce47c 100644
--- a/ContactsApp.Tizen/ContactsApp.Tizen.csproj
+++ b/ContactsApp.Tizen/ContactsApp.Tizen.csproj
@@ -64,11 +64,27 @@
<Compile Include="Common\Controls\FlatButton.xaml.cs">
<DependentUpon>FlatButton.xaml</DependentUpon>
</Compile>
+ <Compile Include="Contacts\View\ContactsPage.xaml.cs">
+ <DependentUpon>ContactsPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Keypad\ViewModel\KeypadViewModel.cs" />
+ <Compile Include="Keypad\View\Controls\Keypad.xaml.cs">
+ <DependentUpon>Keypad.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Keypad\View\Controls\KeypadButton.xaml.cs">
+ <DependentUpon>KeypadButton.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Keypad\View\KeypadPage.xaml.cs">
+ <DependentUpon>KeypadPage.xaml</DependentUpon>
+ </Compile>
<Compile Include="loc\Localization.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Localization.resx</DependentUpon>
</Compile>
+ <Compile Include="Logs\View\LogsPage.xaml.cs">
+ <DependentUpon>LogsPage.xaml</DependentUpon>
+ </Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
@@ -84,6 +100,22 @@
<EmbeddedResource Include="Common\Themes\CommonTheme.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
+ <EmbeddedResource Include="Contacts\View\ContactsPage.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Keypad\View\Controls\Keypad.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Keypad\View\Controls\KeypadButton.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Keypad\View\KeypadPage.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Logs\View\LogsPage.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
<EmbeddedResource Include="MainPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
diff --git a/ContactsApp.Tizen/Keypad/View/Controls/Keypad.xaml b/ContactsApp.Tizen/Keypad/View/Controls/Keypad.xaml
new file mode 100644
index 0000000..1bf8507
--- /dev/null
+++ b/ContactsApp.Tizen/Keypad/View/Controls/Keypad.xaml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="ContactsApp.Tizen.Keypad.View.Controls.Keypad"
+ x:Name="This"
+ xmlns:KeypadControls="clr-namespace:ContactsApp.Tizen.Keypad.View.Controls"
+ xmlns:TizenUtilityControls="clr-namespace:Tizen.UtilityKit.Controls;assembly=Tizen.UtilityKit">
+
+ <ContentView.Resources>
+ <ResourceDictionary>
+ <Color x:Key="KeypadButtonBorderColor">#FFD9D9D9</Color>
+
+ <Style TargetType="KeypadControls:KeypadButton">
+ <Setter Property="HeightRequest" Value="130" />
+ </Style>
+
+ <Style TargetType="Frame">
+ <Setter Property="OutlineColor" Value="{StaticResource KeypadButtonBorderColor}" />
+ <Setter Property="HasShadow" Value="False" />
+ </Style>
+ </ResourceDictionary>
+ </ContentView.Resources>
+
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Frame Grid.Column="0" Grid.Row="0" Padding="0,0,2,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_01.png" KeyImage="keypad_english_13.png"
+ Command="{Binding KeyPush, Source={x:Reference This}, Mode=TwoWay}" CommandParameter="1" />
+ </Frame>
+ <Frame Grid.Column="1" Grid.Row="0" Padding="0,0,2,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_02.png" KeyImage="keypad_english_01.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="2" />
+ </Frame>
+ <Frame Grid.Column="2" Grid.Row="0" Padding="0,0,0,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_03.png" KeyImage="keypad_english_02.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="3" />
+ </Frame>
+
+ <Frame Grid.Column="0" Grid.Row="1" Padding="0,0,2,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_04.png" KeyImage="keypad_english_03.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="4" />
+ </Frame>
+ <Frame Grid.Column="1" Grid.Row="1" Padding="0,0,2,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_05.png" KeyImage="keypad_english_04.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="5" />
+ </Frame>
+ <Frame Grid.Column="2" Grid.Row="1" Padding="0,0,0,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_06.png" KeyImage="keypad_english_05.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="6" />
+ </Frame>
+
+ <Frame Grid.Column="0" Grid.Row="2" Padding="0,0,2,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_07.png" KeyImage="keypad_english_06.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="7" />
+ </Frame>
+ <Frame Grid.Column="1" Grid.Row="2" Padding="0,0,2,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_08.png" KeyImage="keypad_english_07.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="8" />
+ </Frame>
+ <Frame Grid.Column="2" Grid.Row="2" Padding="0,0,0,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_09.png" KeyImage="keypad_english_08.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="9" />
+ </Frame>
+
+ <Frame Grid.Column="0" Grid.Row="3" Padding="0,0,2,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_asterisk.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="*" />
+ </Frame>
+ <Frame Grid.Column="1" Grid.Row="3" Padding="0,0,2,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_00.png" KeyImage="keypad_english_10.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="0" />
+ </Frame>
+ <Frame Grid.Column="2" Grid.Row="3" Padding="0,0,0,2">
+ <KeypadControls:KeypadButton NumberImage="keypad_number_sharp.png"
+ Command="{Binding KeyPush, Source={x:Reference This}}" CommandParameter="#" />
+ </Frame>
+ </Grid>
+</ContentView> \ No newline at end of file
diff --git a/ContactsApp.Tizen/Keypad/View/Controls/Keypad.xaml.cs b/ContactsApp.Tizen/Keypad/View/Controls/Keypad.xaml.cs
new file mode 100644
index 0000000..eea7dc5
--- /dev/null
+++ b/ContactsApp.Tizen/Keypad/View/Controls/Keypad.xaml.cs
@@ -0,0 +1,46 @@
+/*
+ * 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 ContactsApp.Tizen.Keypad.View.Controls
+{
+ /// <summary>
+ /// Represents Keypad
+ /// </summary>
+ public partial class Keypad : ContentView
+ {
+ public Keypad()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Gets or sets a command to invoke when key is pushed
+ /// </summary>
+ public static readonly BindableProperty KeyPushProperty = BindableProperty.Create(
+ "KeyPush",
+ typeof(Command),
+ typeof(Keypad),
+ null);
+
+ public Command KeyPush
+ {
+ get { return (Command)GetValue(KeyPushProperty); }
+ set { SetValue(KeyPushProperty, value); }
+ }
+ }
+}
diff --git a/ContactsApp.Tizen/Keypad/View/Controls/KeypadButton.xaml b/ContactsApp.Tizen/Keypad/View/Controls/KeypadButton.xaml
new file mode 100644
index 0000000..819f12e
--- /dev/null
+++ b/ContactsApp.Tizen/Keypad/View/Controls/KeypadButton.xaml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<CommonControls:FlatButton xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="ContactsApp.Tizen.Keypad.View.Controls.KeypadButton"
+ x:Name="This"
+ xmlns:CommonControls="clr-namespace:ContactsApp.Tizen.Common.Controls"
+ xmlns:TizenUtilityControls="clr-namespace:Tizen.UtilityKit.Controls;assembly=Tizen.UtilityKit"
+ NormalColor="{StaticResource NormalColor}">
+
+ <CommonControls:FlatButton.Resources>
+ <ResourceDictionary>
+ <Color x:Key="KeyImageColor">#CC333333</Color>
+ <Color x:Key="NormalColor">#FFFAFAFA</Color>
+ <Color x:Key="NumberImageColor">#D9000000</Color>
+
+ <Style x:Key="NumberImageStyle" TargetType="TizenUtilityControls:ExtendedImage">
+ <Setter Property="HeightRequest" Value="71" />
+ <Setter Property="BlendingColor" Value="{StaticResource NumberImageColor}" />
+ </Style>
+
+ <Style x:Key="KeyImageStyle" TargetType="TizenUtilityControls:ExtendedImage">
+ <Setter Property="HeightRequest" Value="36" />
+ <Setter Property="BlendingColor" Value="{StaticResource KeyImageColor}" />
+ </Style>
+ </ResourceDictionary>
+ </CommonControls:FlatButton.Resources>
+
+ <StackLayout VerticalOptions="Center">
+ <TizenUtilityControls:ExtendedImage Source="{Binding NumberImage, Source={x:Reference This}}" Style="{StaticResource NumberImageStyle}" />
+ <TizenUtilityControls:ExtendedImage Source="{Binding KeyImage, Source={x:Reference This}}" Style="{StaticResource KeyImageStyle}" />
+ </StackLayout>
+</CommonControls:FlatButton> \ No newline at end of file
diff --git a/ContactsApp.Tizen/Keypad/View/Controls/KeypadButton.xaml.cs b/ContactsApp.Tizen/Keypad/View/Controls/KeypadButton.xaml.cs
new file mode 100644
index 0000000..2645ad8
--- /dev/null
+++ b/ContactsApp.Tizen/Keypad/View/Controls/KeypadButton.xaml.cs
@@ -0,0 +1,62 @@
+/*
+ * 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 ContactsApp.Tizen.Common.Controls;
+using Xamarin.Forms;
+
+namespace ContactsApp.Tizen.Keypad.View.Controls
+{
+ /// <summary>
+ /// Represents button for Keypad
+ /// </summary>
+ public partial class KeypadButton : FlatButton
+ {
+ public KeypadButton()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Gets or sets image of number
+ /// </summary>
+ public static readonly BindableProperty NumberImageProperty = BindableProperty.Create(
+ "NumberImage",
+ typeof(ImageSource),
+ typeof(KeypadButton),
+ null);
+
+ public ImageSource NumberImage
+ {
+ get { return (ImageSource)GetValue(NumberImageProperty); }
+ set { SetValue(NumberImageProperty, value); }
+ }
+
+ /// <summary>
+ /// Gets or sets image of key
+ /// </summary>
+ public static readonly BindableProperty KeyImageProperty = BindableProperty.Create(
+ "KeyImage",
+ typeof(ImageSource),
+ typeof(KeypadButton),
+ null);
+
+ public ImageSource KeyImage
+ {
+ get { return (ImageSource)GetValue(KeyImageProperty); }
+ set { SetValue(KeyImageProperty, value); }
+ }
+ }
+}
diff --git a/ContactsApp.Tizen/Keypad/View/KeypadPage.xaml b/ContactsApp.Tizen/Keypad/View/KeypadPage.xaml
new file mode 100644
index 0000000..ee9e1f3
--- /dev/null
+++ b/ContactsApp.Tizen/Keypad/View/KeypadPage.xaml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+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.
+-->
+
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="ContactsApp.Tizen.Keypad.View.KeypadPage"
+ x:Name="This"
+ xmlns:KeypadControls="clr-namespace:ContactsApp.Tizen.Keypad.View.Controls"
+ xmlns:Localization="clr-namespace:ContactsApp.Tizen.Localization"
+ xmlns:TizenUtilityControls="clr-namespace:Tizen.UtilityKit.Controls;assembly=Tizen.UtilityKit"
+ Title="{x:Static Localization:Localization.TitleKeypad}">
+
+ <ContentPage.Resources>
+ <ResourceDictionary>
+ <Color x:Key="KeypadBackspaceColor">#FFB5B5B5</Color>
+ <Color x:Key="KeypadCallColor">#FF59B03A</Color>
+ </ResourceDictionary>
+ </ContentPage.Resources>
+
+ <StackLayout>
+ <TizenUtilityControls:ExtendedEntry x:Name="xEntry" VerticalOptions="CenterAndExpand"
+ KeyboardType="None" HorizontalTextAlignment="Center"
+ TextColor="{StaticResource DefaultTextColor}" FontSize="56"
+ Text="{Binding PhoneNumber, Source={x:Reference This}}" />
+
+ <KeypadControls:Keypad x:Name="xKeypad" />
+
+ <ContentView HeightRequest="152" BackgroundColor="{StaticResource BGColor}">
+ <StackLayout HorizontalOptions="End" VerticalOptions="Center" Orientation="Horizontal">
+ <Button WidthRequest="310" HeightRequest="104"
+ BackgroundColor="{StaticResource KeypadCallColor}" Image="keypad_ic_call.png" />
+
+ <Button Margin="38,0,64,0" WidthRequest="104" HeightRequest="104"
+ BackgroundColor="{StaticResource KeypadBackspaceColor}" Image="keypad_ic_back.png" />
+ </StackLayout>
+ </ContentView>
+ </StackLayout>
+</ContentPage> \ No newline at end of file
diff --git a/ContactsApp.Tizen/Keypad/View/KeypadPage.xaml.cs b/ContactsApp.Tizen/Keypad/View/KeypadPage.xaml.cs
new file mode 100644
index 0000000..dbd99e4
--- /dev/null
+++ b/ContactsApp.Tizen/Keypad/View/KeypadPage.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 ContactsApp.Tizen.Keypad.View
+{
+ /// <summary>
+ /// Represents Keypad page
+ /// </summary>
+ public partial class KeypadPage : ContentPage
+ {
+ public KeypadPage()
+ {
+ InitializeComponent();
+
+ xKeypad.KeyPush = new Command(OnKeyPushed);
+ }
+
+ /// <summary>
+ /// Gets or sets phone number
+ /// </summary>
+ public static readonly BindableProperty PhoneNumberProperty = BindableProperty.Create(
+ "PhoneNumber",
+ typeof(string),
+ typeof(KeypadPage),
+ string.Empty);
+
+ public string PhoneNumber
+ {
+ get { return (string)GetValue(PhoneNumberProperty); }
+ set { SetValue(PhoneNumberProperty, value); }
+ }
+
+ private void OnKeyPushed(object obj)
+ {
+ PhoneNumber = PhoneNumber.Insert(xEntry.CursorPosition, obj.ToString());
+ }
+ }
+}
diff --git a/ContactsApp.Tizen/Keypad/ViewModel/KeypadViewModel.cs b/ContactsApp.Tizen/Keypad/ViewModel/KeypadViewModel.cs
new file mode 100644
index 0000000..031170a
--- /dev/null
+++ b/ContactsApp.Tizen/Keypad/ViewModel/KeypadViewModel.cs
@@ -0,0 +1,24 @@
+/*
+ * 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 Tizen.UtilityKit.MVVM;
+
+namespace ContactsApp.Tizen.Keypad.ViewModel
+{
+ class KeypadViewModel : BaseModel
+ {
+ }
+}
diff --git a/ContactsApp.Tizen/Logs/View/LogsPage.xaml b/ContactsApp.Tizen/Logs/View/LogsPage.xaml
new file mode 100644
index 0000000..ddc7078
--- /dev/null
+++ b/ContactsApp.Tizen/Logs/View/LogsPage.xaml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+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.
+-->
+
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="ContactsApp.Tizen.Logs.View.LogsPage"
+ xmlns:Localization="clr-namespace:ContactsApp.Tizen.Localization"
+ Title="{x:Static Localization:Localization.TitleLogs}">
+
+</ContentPage> \ No newline at end of file
diff --git a/ContactsApp.Tizen/Logs/View/LogsPage.xaml.cs b/ContactsApp.Tizen/Logs/View/LogsPage.xaml.cs
new file mode 100644
index 0000000..da42b7b
--- /dev/null
+++ b/ContactsApp.Tizen/Logs/View/LogsPage.xaml.cs
@@ -0,0 +1,31 @@
+/*
+ * 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 ContactsApp.Tizen.Logs.View
+{
+ /// <summary>
+ /// Represents Logs page
+ /// </summary>
+ public partial class LogsPage : ContentPage
+ {
+ public LogsPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ContactsApp.Tizen/MainPage.xaml b/ContactsApp.Tizen/MainPage.xaml
index 2cf3a04..1b5b02b 100644
--- a/ContactsApp.Tizen/MainPage.xaml
+++ b/ContactsApp.Tizen/MainPage.xaml
@@ -15,8 +15,14 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
-<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- x:Class="ContactsApp.Tizen.MainPage">
+<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="ContactsApp.Tizen.MainPage"
+ xmlns:ContactsView="clr-namespace:ContactsApp.Tizen.Contacts.View"
+ xmlns:KeypadView="clr-namespace:ContactsApp.Tizen.Keypad.View"
+ xmlns:LogsView="clr-namespace:ContactsApp.Tizen.Logs.View">
-</ContentPage> \ No newline at end of file
+ <KeypadView:KeypadPage />
+ <LogsView:LogsPage />
+ <ContactsView:ContactsPage />
+</TabbedPage> \ No newline at end of file
diff --git a/ContactsApp.Tizen/MainPage.xaml.cs b/ContactsApp.Tizen/MainPage.xaml.cs
index e6b857a..3b9b1fb 100644
--- a/ContactsApp.Tizen/MainPage.xaml.cs
+++ b/ContactsApp.Tizen/MainPage.xaml.cs
@@ -18,7 +18,10 @@ using Xamarin.Forms;
namespace ContactsApp.Tizen
{
- public partial class MainPage : ContentPage
+ /// <summary>
+ /// Represents Main page
+ /// </summary>
+ public partial class MainPage : TabbedPage
{
public MainPage()
{