Apply fixes after review.
authorPiotr Czaja/Advanced Frameworks (PLT) /SRPOL/Engineer/Samsung Electronics <p.czaja@samsung.com>
Tue, 29 Jun 2021 04:44:12 +0000 (06:44 +0200)
committerPiotr Czaja <p.czaja@samsung.com>
Tue, 14 Sep 2021 11:01:34 +0000 (13:01 +0200)
Fitness/Controls/BindableCollectionView.cs [deleted file]
Fitness/res/layout/BarView.xaml
Fitness/res/layout/MainView.xaml

diff --git a/Fitness/Controls/BindableCollectionView.cs b/Fitness/Controls/BindableCollectionView.cs
deleted file mode 100644 (file)
index 948899a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using Fitness.Views;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Binding;
-using Tizen.NUI.Components;
-
-namespace Fitness.Controls
-{
-    /// <summary>
-    /// Collection View with bindable item source property.
-    /// </summary>
-    public class BindableCollectionView : CollectionView
-    {
-        /// <summary>
-        /// ItemsSource property.
-        /// </summary>
-        public static new readonly BindableProperty ItemsSourceProperty =
-            BindableProperty.Create(nameof(ItemsSource), typeof(IEnumerable), typeof(BindableCollectionView), null, propertyChanged: OnItemsSourceChanged);
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="BindableCollectionView"/> class.
-        /// </summary>
-        public BindableCollectionView()
-        {
-        }
-
-        /// <summary>
-        /// A delegate to be run when ItemsSource property has changed.
-        /// </summary>
-        /// <param name="bindable">The bindable object that contains the property.</param>
-        /// <param name="oldValue">The old property value.</param>
-        /// <param name="newValue">The new property value.</param>
-        public static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue)
-        {
-            if (bindable is BindableCollectionView collectionView && newValue is IEnumerable itemsSource)
-            {
-                collectionView.ItemsSource = itemsSource;
-            }
-        }
-    }
-}
index 80d7694250d4576e3ad0bd1b16a3df32ec6805e7..961c10c74bf80b414de9419f82230eb9eae02db9 100644 (file)
@@ -8,7 +8,7 @@
   xmlns:nui="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
   xmlns:styles="clr-namespace:Fitness.Views.Styles"
   xmlns:behaviors="clr-namespace:Fitness.Views.Behaviors"
-  WidthSpecification="-1"
+  WidthSpecification="MatchParent"
   Size="{views:SizeInUnits Height=30}"
   x:Name="Root">
     <ctrl:NinePatchButton Text="previous"
index fa518f46ed35c1e8ae6b288967ad47b8dc9cbda5..ea38c8b6dacaa20a0dd50d777e86788053e446c0 100644 (file)
           <ImageView PositionUsesPivotPoint="true" PivotPoint="1.0,0.0" ParentOrigin="1.0, 0.0" Size="30,30" BindingContext="{Binding Source={x:Reference context}, Path=SelectedWorkout}" ResourceUrl="{Binding Favourite, Converter={Static converters:FavouriteToIconConverter.Converter}}"/>
       </View>
   </View>
-    <ctrl:BindableCollectionView Size="{views:SizeInUnits Height=44}" Margin="{views:ExtentsInUnits Top=10, Bottom=10, Start=16, End=16}" WidthSpecification="-1" ItemsSource="{Binding Workouts}" SelectedItem="{Binding Path=SelectedWorkout, Mode=TwoWay}" SelectionMode="SingleAlways" ScrollingDirection="Horizontal">
-        <ctrl:BindableCollectionView.ItemTemplate>
+    <nui:CollectionView Size="{views:SizeInUnits Height=44}" Margin="{views:ExtentsInUnits Top=10, Bottom=10, Start=16, End=16}" WidthSpecification="-1" ItemsSource="{Binding Workouts}" SelectedItem="{Binding Path=SelectedWorkout, Mode=TwoWay}" SelectionMode="SingleAlways" ScrollingDirection="Horizontal">
+        <nui:CollectionView.ItemTemplate>
             <DataTemplate>
                 <views:FitnessItemView />
             </DataTemplate>
-        </ctrl:BindableCollectionView.ItemTemplate>
-        <ctrl:BindableCollectionView.ItemsLayouter>
+        </nui:CollectionView.ItemTemplate>
+        <nui:CollectionView.ItemsLayouter>
             <nui:GridLayouter />
-        </ctrl:BindableCollectionView.ItemsLayouter>
-    </ctrl:BindableCollectionView>
+        </nui:CollectionView.ItemsLayouter>
+    </nui:CollectionView>
 </ctrl:Page>