Add MusicTab
authorHeonjae Jang <heonjae.jang@samsung.com>
Wed, 19 Apr 2017 11:18:09 +0000 (20:18 +0900)
committerHeonjae Jang <heonjae.jang@samsung.com>
Wed, 19 Apr 2017 11:18:09 +0000 (20:18 +0900)
1. Add MusicTab
2. Add IsFooterEnableProperty in FooterNormalStatus
3. Change Option DropdownList to Button and ContextPopup
4. Add Boilerplate

Change-Id: Id131cd836cadfd638bfb3976578abb449f0f0c0c
Signed-off-by: Heonjae Jang <heonjae.jang@samsung.com>
18 files changed:
TVMediaHub/TVMediaHub.Tizen/DataModels/SelectedEventArgs.cs [new file with mode: 0644]
TVMediaHub/TVMediaHub.Tizen/Models/MediaShortcutInfo.cs
TVMediaHub/TVMediaHub.Tizen/TVMediaHub.Tizen.csproj
TVMediaHub/TVMediaHub.Tizen/Views/AnimationLayerPage.cs
TVMediaHub/TVMediaHub.Tizen/Views/CustomImageControl.cs
TVMediaHub/TVMediaHub.Tizen/Views/FooterDeleteStatus.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/FooterNormalStatus.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/FooterSelectedStatus.xaml [deleted file]
TVMediaHub/TVMediaHub.Tizen/Views/FooterSelectedStatus.xaml.cs [deleted file]
TVMediaHub/TVMediaHub.Tizen/Views/ImageTab.xaml
TVMediaHub/TVMediaHub.Tizen/Views/ImageTab.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/MediaHubMainPage.xaml
TVMediaHub/TVMediaHub.Tizen/Views/MusicTab.xaml
TVMediaHub/TVMediaHub.Tizen/Views/MusicTab.xaml.cs
TVMediaHub/TVMediaHub.Tizen/Views/RecentlyWatchedVideoContent.xaml [deleted file]
TVMediaHub/TVMediaHub.Tizen/Views/RecentlyWatchedVideoContent.xaml.cs [deleted file]
TVMediaHub/TVMediaHub.Tizen/Views/VideoTab.xaml
TVMediaHub/TVMediaHub.Tizen/Views/VideoTab.xaml.cs

diff --git a/TVMediaHub/TVMediaHub.Tizen/DataModels/SelectedEventArgs.cs b/TVMediaHub/TVMediaHub.Tizen/DataModels/SelectedEventArgs.cs
new file mode 100644 (file)
index 0000000..3b0d601
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 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;
+using Tizen.Xamarin.Forms.Extension;
+
+namespace TVMediaHub.Tizen.DataModels
+{
+    public class ContextPopupSelectedEventArgs : EventArgs
+    {
+        public int Index { get; }
+        public ContextPopupItem Item { get; }
+
+        public ContextPopupSelectedEventArgs(int index, ContextPopupItem item)
+        {
+            Index = index;
+            Item = item;
+        }
+    }
+}
index 17e3cb6..d976182 100644 (file)
@@ -1,11 +1,21 @@
-using System;
-using System.Collections.Generic;
+/*
+ * Copyright (c) 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.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using Tizen.Content.MediaContent;
-using TVMediaHub.Tizen.Utils;
 
 namespace TVMediaHub.Tizen.Models
 {
index f3973ae..72cb161 100755 (executable)
     <Compile Include="Views\MusicTab.xaml.cs">
       <DependentUpon>MusicTab.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\RecentlyWatchedVideoContent.xaml.cs">
-      <DependentUpon>RecentlyWatchedVideoContent.xaml</DependentUpon>
-    </Compile>
     <Compile Include="Views\VideoGroup.xaml.cs">
       <DependentUpon>VideoGroup.xaml</DependentUpon>
     </Compile>
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
-    <EmbeddedResource Include="Views\RecentlyWatchedVideoContent.xaml">
-      <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
     <EmbeddedResource Include="Views\VideoGroup.xaml">
       <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
     </EmbeddedResource>
   <ProjectExtensions>
     <VisualStudio>
       <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Debug|Any CPU">
-        <ProjectCommonFlavorCfg />
+        <ProjectCorporateFlavorCfg />
       </FlavorProperties>
       <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Release|Any CPU">
-        <ProjectCommonFlavorCfg />
+        <ProjectCorporateFlavorCfg />
       </FlavorProperties>
     </VisualStudio>
   </ProjectExtensions>
index 551693d..2181b64 100644 (file)
@@ -1,8 +1,19 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection.Emit;
-using System.Text;
+/*
+ * Copyright (c) 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.Threading.Tasks;
 
 using Xamarin.Forms;
index 850cf94..07457c6 100644 (file)
@@ -1,9 +1,19 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using TVMediaHub.Tizen.Utils;
+/*
+ * Copyright (c) 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 TVMediaHub.Tizen.Views
index 12b64e4..2cb7444 100644 (file)
@@ -1,4 +1,19 @@
-
+/*
+ * Copyright (c) 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;
 using Xamarin.Forms;
 using Xamarin.Forms.Xaml;
index 31f13ec..3b167ad 100644 (file)
@@ -1,25 +1,45 @@
-using System;
+/*
+ * Copyright (c) 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;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 
 using Xamarin.Forms;
 using Xamarin.Forms.Xaml;
 using Tizen.Xamarin.Forms.Extension;
-using System.Collections.ObjectModel;
 using TVMediaHub.Tizen.Utils;
-using Tizen;
+using TVMediaHub.Tizen.DataModels;
 
 namespace TVMediaHub.Tizen.Views
 {
     [XamlCompilation(XamlCompilationOptions.Compile)]
     public partial class FooterNormalStatus : RelativeLayout
     {
+        public static readonly BindableProperty IsFooterEnabledProperty = BindableProperty.Create("IsFooterEnabled", typeof(bool), typeof(FooterNormalStatus), true);
+
+        public bool IsFooterEnabled
+        {
+            get { return (bool)GetValue(IsFooterEnabledProperty); }
+            set { SetValue(IsFooterEnabledProperty, value); }
+        }
+
         /// <summary>
         /// Identifies the SourceList bindable property
         /// </summary
-        public static readonly BindableProperty SourceListProperty = BindableProperty.Create("SourceList", typeof(IEnumerable<string>), typeof(VideoTab), default(IEnumerable<string>));
+        public static readonly BindableProperty SourceListProperty = BindableProperty.Create("SourceList", typeof(IEnumerable<string>), typeof(FooterNormalStatus), default(IEnumerable<string>));
 
         /// <summary>
         /// Gets or sets list about source of contents
@@ -33,7 +53,7 @@ namespace TVMediaHub.Tizen.Views
         /// <summary>
         /// Identifies the SortOptions bindable property
         /// </summary
-        public static readonly BindableProperty SortOptionsProperty = BindableProperty.Create("SortOptions", typeof(IEnumerable<string>), typeof(VideoTab), default(IEnumerable<string>));
+        public static readonly BindableProperty SortOptionsProperty = BindableProperty.Create("SortOptions", typeof(IEnumerable<string>), typeof(FooterNormalStatus), default(IEnumerable<string>));
 
         /// <summary>
         /// Gets or sets sort options
@@ -47,7 +67,7 @@ namespace TVMediaHub.Tizen.Views
         /// <summary>
         /// Identifies the OptionList bindable property
         /// </summary
-        public static readonly BindableProperty OptionListProperty = BindableProperty.Create("OptionList", typeof(IEnumerable<string>), typeof(VideoTab), default(IEnumerable<string>));
+        public static readonly BindableProperty OptionListProperty = BindableProperty.Create("OptionList", typeof(IEnumerable<string>), typeof(FooterNormalStatus), default(IEnumerable<string>));
 
         /// <summary>
         /// Gets or sets list about options
@@ -71,7 +91,7 @@ namespace TVMediaHub.Tizen.Views
         /// <summary>
         /// A EventHandler for DropdownOption ItemSelected event
         /// </summary>
-        public EventHandler<SelectedItemChangedEventArgs> OnDropdownOptionItemSelected;
+        public EventHandler<ContextPopupSelectedEventArgs> OnSelectedOptionIndexChanged;
 
         /// <summary>
         /// A DropdownList for displaying sources of contents
@@ -84,9 +104,10 @@ namespace TVMediaHub.Tizen.Views
         private DropdownList DropdownSort;
 
         /// <summary>
-        /// A DropdownList for displaying page options
+        /// A Button for displaying page options
         /// </summary>
-        private DropdownList DropdownOption;
+        private Button ButtonOption;
+        private bool isPopupShowing;
 
         /// <summary>
         /// A Constructor
@@ -94,7 +115,7 @@ namespace TVMediaHub.Tizen.Views
         public FooterNormalStatus()
         {
             InitializeComponent();
-            InitializeDropdownLists();
+            InitializeFooterItems();
             PropertyChanged += FooterNormalStatusPropertyChanged;
         }
 
@@ -108,23 +129,40 @@ namespace TVMediaHub.Tizen.Views
             {
                 DropdownSort.ItemsSource = SortOptions;
             }
-            else if (e.PropertyName.Equals("OptionList"))
+            else if (e.PropertyName.Equals("IsFooterEnabled"))
             {
-                DropdownOption.ItemsSource = OptionList;
+                DropdownSource.IsEnabled = IsFooterEnabled;
+                DropdownSort.IsEnabled = IsFooterEnabled;
+                ButtonOption.IsEnabled = IsFooterEnabled;
+                if (!IsFooterEnabled)
+                {
+                    ButtonOption.Text = "";
+                }
+                else
+                {
+                    ButtonOption.Text = "OPTION";
+                }
             }
         }
 
         /// <summary>
-        /// A method for initializing DropdownLists
+        /// A method for initializing footer items
         /// </summary>
-        private void InitializeDropdownLists()
+        private void InitializeFooterItems()
         {
             DropdownSource = new DropdownList();
             DropdownSort = new DropdownList();
-            DropdownOption = new DropdownList();
+            ButtonOption = new Button();
+
+            ButtonOption.Text = "OPTION";
+
+            DropdownSource.IsEnabled = IsFooterEnabled;
+            DropdownSort.IsEnabled = IsFooterEnabled;
+            ButtonOption.IsEnabled = IsFooterEnabled;
+
+
             DropdownSource.ItemsSource = SourceList;
             DropdownSort.ItemsSource = SortOptions;
-            DropdownOption.ItemsSource = OptionList;
 
             DropdownSource.ItemSelected += (s, e) =>
             {
@@ -136,10 +174,10 @@ namespace TVMediaHub.Tizen.Views
                 OnDropdownSortItemSelected?.Invoke(s, e);
             };
 
-            DropdownOption.ItemSelected += (s, e) =>
+            ButtonOption.Command = new Command(() =>
             {
-                OnDropdownOptionItemSelected?.Invoke(s, e);
-            };
+                showContextPopup();
+            });
 
             // TODO : Change yConstraint.
             // Tab Size - 128
@@ -156,11 +194,51 @@ namespace TVMediaHub.Tizen.Views
                 yConstraint: Constraint.Constant(SizeUtils.GetWidthSize(704)),
                 xConstraint: Constraint.Constant(SizeUtils.GetWidthSize(1226)));
 
-            Children.Add(DropdownOption,
+            Children.Add(ButtonOption,
                 heightConstraint: Constraint.Constant(SizeUtils.GetHeightSize(80)),
                 widthConstraint: Constraint.Constant(SizeUtils.GetWidthSize(300)),
                 yConstraint: Constraint.Constant(SizeUtils.GetWidthSize(704)),
                 xConstraint: Constraint.Constant(SizeUtils.GetWidthSize(1526)));
         }
+
+        private void showContextPopup()
+        {
+            if (isPopupShowing)
+            {
+                return;
+            }
+
+            ContextPopup popup = new ContextPopup
+            {
+                IsAutoHidingEnabled = true,
+                Orientation = ContextPopupOrientation.Vertical,
+                DirectionPriorities = new ContextPopupDirectionPriorities(ContextPopupDirection.Up, ContextPopupDirection.Right, ContextPopupDirection.Left, ContextPopupDirection.Down),
+            };
+
+            if (OptionList != null)
+            {
+                foreach(var item in OptionList)
+                {
+                    popup.Items.Add(new ContextPopupItem(item));
+                }
+            }
+
+            //TODO: need to change the event callback
+            popup.SelectedIndexChanged += (s, args) =>
+            {
+                var index = popup.SelectedIndex;
+                var item = popup.SelectedItem as ContextPopupItem;
+                OnSelectedOptionIndexChanged.Invoke(s, new ContextPopupSelectedEventArgs(index, item));
+                popup.Dismiss();
+            };
+
+            popup.Dismissed += (s, args) =>
+            {
+                isPopupShowing = false;
+            };
+
+            popup.Show(ButtonOption);
+            isPopupShowing = true;
+        }
     }
 }
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/FooterSelectedStatus.xaml b/TVMediaHub/TVMediaHub.Tizen/Views/FooterSelectedStatus.xaml
deleted file mode 100644 (file)
index 1e57b28..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<StackLayout xmlns="http://xamarin.com/schemas/2014/forms"
-             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
-             x:Class="TVMediaHub.Tizen.Views.FooterSelectedStatus">
-    <StackLayout.Orientation>Horizontal</StackLayout.Orientation>
-    <Button Text="Select All" HorizontalOptions="Start"></Button>
-    <Button Text="OK" HorizontalOptions="End"></Button>
-    <Button Text="Cancel" HorizontalOptions="End"></Button>
-</StackLayout>
\ No newline at end of file
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/FooterSelectedStatus.xaml.cs b/TVMediaHub/TVMediaHub.Tizen/Views/FooterSelectedStatus.xaml.cs
deleted file mode 100644 (file)
index d1915b5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-using Xamarin.Forms;
-using Xamarin.Forms.Xaml;
-
-namespace TVMediaHub.Tizen.Views
-{
-    [XamlCompilation(XamlCompilationOptions.Compile)]
-    public partial class FooterSelectedStatus : StackLayout
-    {
-        public FooterSelectedStatus()
-        {
-            InitializeComponent();
-        }
-    }
-}
index 00e0cb6..3e3ce88 100755 (executable)
@@ -21,6 +21,7 @@
                                       RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
                                       RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"/>
             <Views:FooterNormalStatus x:Name="FooterNormal"  IsVisible="True"
+                                      IsFooterEnabled="True"
                                       RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
                                       RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
                                       SourceList="{Binding SourceList}"
index d5dac4b..cbcc4f7 100755 (executable)
@@ -20,6 +20,8 @@ using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.Threading.Tasks;
 using System.Windows.Input;
+using Tizen.Xamarin.Forms.Extension;
+using TVMediaHub.Tizen.DataModels;
 using TVMediaHub.Tizen.Models;
 using TVMediaHub.Tizen.Utils;
 using TVMediaHub.Tizen.ViewModels;
@@ -124,7 +126,7 @@ namespace TVMediaHub.Tizen.Views
 
             FooterNormal.OnDropdownSortItemSelected += OnSortOptionChanged;
 
-            FooterNormal.OnDropdownOptionItemSelected += OnOptionSelected;
+            FooterNormal.OnSelectedOptionIndexChanged += OnOptionSelected;
 
             FooterDelete.SelecteAllButtonEvent += OnSelectAllClicked;
             FooterDelete.OKButtonEvent += OnOKClicked;
@@ -160,9 +162,9 @@ namespace TVMediaHub.Tizen.Views
             ChangeSortOptionCommand?.Execute(e.SelectedItem);
         }
 
-        private void OnOptionSelected(object sender, SelectedItemChangedEventArgs e)
+        private void OnOptionSelected(object sender, ContextPopupSelectedEventArgs e)
         {
-            if (e.SelectedItem.Equals("Delete"))
+            if (e.Item.Label.Equals("Delete"))
             {
                 DeleteModeChangeCommand?.Execute("");
                 FooterNormal.IsVisible = false;
index d594a83..a703683 100755 (executable)
@@ -3,8 +3,9 @@
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="TVMediaHub.Tizen.Views.MediaHubMainPage"
             xmlns:Views="clr-namespace:TVMediaHub.Tizen.Views"
-            Title="MediaHub"
+            Title="MEDIA HUB"
             BackgroundColor="#E60F0F0F">
     <Views:VideoTab/>
     <Views:ImageTab/>
+    <Views:MusicTab/>
 </TabbedPage>
index 81df9c0..986fe63 100644 (file)
@@ -4,29 +4,20 @@
              x:Class="TVMediaHub.Tizen.Views.MusicTab"
              xmlns:Views="clr-namespace:TVMediaHub.Tizen.Views"
              Title="Music">
-    <RelativeLayout
-        RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
-        RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}">
-        <ScrollView RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.855}"
-                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                Orientation="Horizontal">
-            <StackLayout Orientation="Horizontal">
-                <BoxView BackgroundColor="Aqua" HeightRequest="500" WidthRequest="500"/>
-                <BoxView BackgroundColor="Bisque" HeightRequest="500" WidthRequest="500"/>
-                <BoxView BackgroundColor="SaddleBrown" HeightRequest="500" WidthRequest="500"/>
-                <BoxView BackgroundColor="Coral" HeightRequest="500" WidthRequest="500"/>
-                <BoxView BackgroundColor="GreenYellow" HeightRequest="500" WidthRequest="500"/>
-                <BoxView BackgroundColor="SteelBlue" HeightRequest="500" WidthRequest="500"/>
-            </StackLayout>
-        </ScrollView>
-        <!-- TODO : Remove Label -->
-        <Label Text="Music Tab"></Label>
-
-        <!-- TODO : Add Footer -->
-        <RelativeLayout RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.145}"
-                    RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                    RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.855}">
-        </RelativeLayout>
-
+    <!-- TODO : Fix to Guide  -->
+    <RelativeLayout x:Name="NoContentsArea"
+                    RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+                    RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}">
+        <Views:FooterNormalStatus x:Name="Footer"
+                                  IsFooterEnabled="false"
+                                  RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+                                  RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"/>
+        <Label x:Name="NoContentsLabel"
+               RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+               RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
+               HorizontalOptions="Center"
+               VerticalOptions="Center"
+               Text="No Contents"
+               TextColor="White"/>
     </RelativeLayout>
 </ContentPage>
\ No newline at end of file
index 6a892ef..52f70b4 100644 (file)
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+using System;
+using TVMediaHub.Tizen.Utils;
 using Xamarin.Forms;
 
 namespace TVMediaHub.Tizen.Views
@@ -23,6 +25,13 @@ namespace TVMediaHub.Tizen.Views
         public MusicTab()
         {
             InitializeComponent();
+            InitializeSize();
+        }
+
+        private void InitializeSize()
+        {
+            // TODO : Fix to Guide
+            NoContentsLabel.FontSize = SizeUtils.GetFontSize(33);
         }
     }
 }
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/RecentlyWatchedVideoContent.xaml b/TVMediaHub/TVMediaHub.Tizen/Views/RecentlyWatchedVideoContent.xaml
deleted file mode 100644 (file)
index cf5c91b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Grid xmlns="http://xamarin.com/schemas/2014/forms"
-      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
-      x:Class="TVMediaHub.Tizen.Views.RecentlyWatchedVideoContent">
-  <Grid.RowDefinitions>
-    <RowDefinition Height="124*"/>
-    <RowDefinition Height="362*"/>
-    <RowDefinition Height="24*"/>
-    <RowDefinition Height="50*"/>
-    <RowDefinition Height="6*"/>
-    <RowDefinition Height="30*"/>
-    <RowDefinition Height="156*"/>
-  </Grid.RowDefinitions>
-  <Grid.ColumnDefinitions>
-    <ColumnDefinition Width="1*"/>
-  </Grid.ColumnDefinitions>
-  <Image x:Name="ContentImage"
-         Source="recent_movie_test.png"
-         Aspect="Fill"
-         Grid.Row="1"
-         Grid.Column="0"/>
-  <Label x:Name="ContentTitle"
-         Grid.Row="3"
-         Grid.Column="0"
-         Text="The Secret Life of Walter"/>
-  <Label x:Name="ContentDescription"
-         Grid.Row="5"
-         Grid.Column="0"
-         Text="Yesterday"/>
-</Grid>
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/RecentlyWatchedVideoContent.xaml.cs b/TVMediaHub/TVMediaHub.Tizen/Views/RecentlyWatchedVideoContent.xaml.cs
deleted file mode 100644 (file)
index 7ede968..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 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;
-using TVMediaHub.Tizen.Utils;
-using Xamarin.Forms;
-
-namespace TVMediaHub.Tizen.Views
-{
-    public partial class RecentlyWatchedVideoContent : Grid
-    {
-        public RecentlyWatchedVideoContent()
-        {
-            InitializeComponent();
-            InitializeSize();
-        }
-
-        private void InitializeSize()
-        {
-            HeightRequest = SizeUtils.GetHeightSize(880);
-            WidthRequest = SizeUtils.GetWidthSize(642);
-
-            ContentTitle.FontSize = SizeUtils.GetFontSize(40);
-            ContentTitle.TextColor = Color.FromRgb(255,255,255);
-            ContentDescription.FontSize = SizeUtils.GetFontSize(22);
-            ContentDescription.TextColor = Color.FromRgb(137,137,137);
-        }
-    }
-}
index 6f8d3e2..43c6213 100644 (file)
@@ -25,6 +25,7 @@
                                       RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
                                       RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"/>
             <Views:FooterNormalStatus x:Name="FooterNormal"  IsVisible="True"
+                                      IsFooterEnabled="True"
                                       RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
                                       RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
                                       SourceList="{Binding SourceList}"
index b87e61d..76d40ab 100644 (file)
@@ -21,6 +21,8 @@ using System.ComponentModel;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Input;
+using Tizen.Xamarin.Forms.Extension;
+using TVMediaHub.Tizen.DataModels;
 using TVMediaHub.Tizen.Models;
 using TVMediaHub.Tizen.Utils;
 using TVMediaHub.Tizen.ViewModels;
@@ -132,7 +134,7 @@ namespace TVMediaHub.Tizen.Views
 
             FooterNormal.OnDropdownSortItemSelected += OnSortOptionChanged;
 
-            FooterNormal.OnDropdownOptionItemSelected += OnOptionSelected;
+            FooterNormal.OnSelectedOptionIndexChanged += OnOptionSelected;
 
             FooterDelete.SelecteAllButtonEvent += OnSelectAllClicked;
             FooterDelete.OKButtonEvent += OnOKClicked;
@@ -169,9 +171,9 @@ namespace TVMediaHub.Tizen.Views
             ChangeSortOptionCommand?.Execute(e.SelectedItem);
         }
 
-        private void OnOptionSelected(object sender, SelectedItemChangedEventArgs e)
+        private void OnOptionSelected(object sender, ContextPopupSelectedEventArgs e)
         {
-            if (e.SelectedItem.Equals("Delete"))
+            if (e.Item.Label.Equals("Delete"))
             {
                 ChangeTabStatusCommand?.Execute("");
                 FooterNormal.IsVisible = false;