summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xTVMediaHub/TVMediaHub.Tizen/Views/ImageTab.xaml.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/TVMediaHub/TVMediaHub.Tizen/Views/ImageTab.xaml.cs b/TVMediaHub/TVMediaHub.Tizen/Views/ImageTab.xaml.cs
index e5548ed..777b9e2 100755
--- a/TVMediaHub/TVMediaHub.Tizen/Views/ImageTab.xaml.cs
+++ b/TVMediaHub/TVMediaHub.Tizen/Views/ImageTab.xaml.cs
@@ -444,10 +444,12 @@ namespace TVMediaHub.Tizen.Views
var FocusableBoundFrom = scrollX;
var FocusableBoundTo = scrollX + SizeUtils.BaseScreenWidth - ItemWidth;
- var list = BottomButtonList.FindAll((pair) => (pair.Key >= FocusableBoundFrom && pair.Key <= FocusableBoundTo));
+ var list = BottomButtonList.FindAll((pair) => {
+ Console.WriteLine("Pair.key " + pair.Key);
+ return (pair.Key >= FocusableBoundFrom && pair.Key <= FocusableBoundTo);
+ });
- string what = "The number of filtered objects is " + list?.Count + "(" + FocusableBoundFrom + ")" + "(" + FocusableBoundTo + ")";
- Console.WriteLine(what);
+ Console.WriteLine("{0} - {1}", FocusableBoundFrom, FocusableBoundTo);
for (var buttonIndex = 0; buttonIndex < list.Count; buttonIndex++)
{
@@ -501,13 +503,13 @@ namespace TVMediaHub.Tizen.Views
/// <param name="targetX">The given target</param>
/// <param name="targetWidth">The width of the given target</param>
/// <param name="padding">The padding of the given target</param>
- private void ScrollToTarget(double targetX, int targetWidth, int padding)
+ private async void ScrollToTarget(double targetX, int targetWidth, int padding)
{
var ScrollX = ImageTabScrollView.ScrollX;
- var ScrollBoundFrom = targetX - (SizeUtils.BaseScreenWidth - targetWidth - padding);
+ var ScrollBoundFrom = targetX - (double)(SizeUtils.BaseScreenWidth - targetWidth - padding);
ScrollBoundFrom = ScrollBoundFrom > 0 ? ScrollBoundFrom : 0;
- var ScrollBoundTo = targetX - padding;
+ var ScrollBoundTo = targetX - (double)padding;
ScrollBoundTo = ScrollBoundTo > 0 ? ScrollBoundTo : 0;
// Is Focusable.
@@ -518,13 +520,13 @@ namespace TVMediaHub.Tizen.Views
if (Math.Abs(ScrollX - ScrollBoundFrom) > Math.Abs(ScrollX - ScrollBoundTo))
{
- ImageTabScrollView.ScrollToAsync(ScrollBoundTo, 0, true);
SetFooterFocusChain(ScrollBoundTo);
+ await ImageTabScrollView.ScrollToAsync(ScrollBoundTo, 0, true);
}
else
{
- ImageTabScrollView.ScrollToAsync(ScrollBoundFrom, 0, true);
SetFooterFocusChain(ScrollBoundFrom);
+ await ImageTabScrollView.ScrollToAsync(ScrollBoundFrom, 0, true);
}
}