TV Apps - Fix Apps List
authorHeonjae Jang <heonjae.jang@samsung.com>
Tue, 21 Mar 2017 01:54:52 +0000 (10:54 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:48 +0000 (18:34 +0900)
Change-Id: I567804dec7a68540a1338038becb3071ce7580c7

TVApps/TVApps/Controls/AppListView.xaml
TVApps/TVApps/Controls/AppListView.xaml.cs

index c07475bde69b51150be26bfe6ebd7a6853d46cbe..a377cbe1a1d52563db08d687ac1d8409c4a08e92 100755 (executable)
@@ -7,31 +7,28 @@
             HorizontalOptions="Fill"
             Orientation="Horizontal">
 
-  <RelativeLayout x:Name="AppListGrid"
-                  HorizontalOptions="Start"
-                  RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
-                  RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                  RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
-                  RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
-                  Padding="58, 0, 58, 0">
+    <RelativeLayout x:Name="AppListGrid"
+                    RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}"
+                    RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+                    RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}">
 
-    <StackLayout x:Name="AppUpperList"
-                 RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4772}"
-                 RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                 RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
-                 RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
-                 Orientation="Horizontal"
-                 HorizontalOptions="Start"
-                 Spacing="16"/>
+        <StackLayout x:Name="AppUpperList"
+                     RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4772}"
+                     RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0}"
+                     RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+                     Orientation="Horizontal"
+                     HorizontalOptions="Start"
+                     Padding="58, 0, 58, 0"
+                     Spacing="16"/>
 
-    <StackLayout x:Name="AppLowerList"
-                 RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4772}"
-                 RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
-                 RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=AppUpperList, Property=Height, Factor=1, Constant=20}"
-                 RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
-                 Orientation="Horizontal"
-                 HorizontalOptions="Start"
-                 Spacing="16"/>
+        <StackLayout x:Name="AppLowerList"
+                     RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.4772}"
+                     RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=AppUpperList, Property=Height, Factor=1, Constant=20}"
+                     RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0}"
+                     Orientation="Horizontal"
+                     HorizontalOptions="Start"
+                     Padding="58, 0, 58, 0"
+                     Spacing="16"/>
 
-  </RelativeLayout>
+    </RelativeLayout>
 </ScrollView>
index 1862584c43962fa39cf47877c9fc12d30f84bb14..1d03da4106df5ae2c7b6993b7242f41c54ad637c 100644 (file)
@@ -128,9 +128,9 @@ namespace TVApps.Controls
         private async void ScrollToIndex(int index)
         {
             var StartX = AppUpperList.Children[index].X;
-            var LowerBound = StartX - 16 - 57 - (256 * 6) + 58;
+            var LowerBound = StartX - (240 * 6) - (16 * 7) - 56;
             LowerBound = LowerBound > 0 ? LowerBound : 0;
-            var UpperBound = StartX - 16 - 57 + 58;
+            var UpperBound = StartX - 16 - 56;
             UpperBound = UpperBound > 0 ? UpperBound : 0;
 
             // Is Focusable.