summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj@nicesj.com>2017-09-11 04:57:58 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-09-11 04:57:58 +0000
commitf39bdc5cdf889115f7c2907a5f460690fb72dea7 (patch)
tree7842f80c7c0e3a28cd3e4e7a69753e2b650ce040
parentc19d865a3c356e2f445bc659e33692c44c981bb0 (diff)
parent81659fb1e028bc240fa0ae07e6af5e0e316fbd63 (diff)
downloadmediahub-f39bdc5cdf889115f7c2907a5f460690fb72dea7.tar.gz
mediahub-f39bdc5cdf889115f7c2907a5f460690fb72dea7.tar.bz2
mediahub-f39bdc5cdf889115f7c2907a5f460690fb72dea7.zip
Merge "Added await keyword for the asynchronous methods." into tizen
-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);
}
}