summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-06-23 00:57:58 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-06-23 00:57:58 +0000
commitb17722c971634065ffc534a7da1ffa7021475ff6 (patch)
tree7e2f3123d337be03e157cd76f5c2597da454c6d1
parentcde2bc8741e2047e5dab7b8560b161eecfc1bd53 (diff)
parent7a9a7c7e40ca450ef537a050177697c588c133d8 (diff)
downloadelm-sharp-b17722c971634065ffc534a7da1ffa7021475ff6.tar.gz
elm-sharp-b17722c971634065ffc534a7da1ffa7021475ff6.tar.bz2
elm-sharp-b17722c971634065ffc534a7da1ffa7021475ff6.zip
Merge "Add the scenario for chekcing GenList operation" into tizen
-rwxr-xr-x[-rw-r--r--]ElmSharp.Test/TC/GenListTest2.cs22
1 files changed, 20 insertions, 2 deletions
diff --git a/ElmSharp.Test/TC/GenListTest2.cs b/ElmSharp.Test/TC/GenListTest2.cs
index 58d0952..a22311a 100644..100755
--- a/ElmSharp.Test/TC/GenListTest2.cs
+++ b/ElmSharp.Test/TC/GenListTest2.cs
@@ -16,6 +16,7 @@
using System;
using ElmSharp;
+using System.Collections.Generic;
namespace ElmSharp.Test
{
@@ -55,14 +56,18 @@ namespace ElmSharp.Test
return string.Format("{0} - {1}", (string)obj, part);
}
};
+
GenListItem[] items = new GenListItem[100];
- for (int i = 0; i < 100; i++)
+ int i = 0;
+ for (i = 0; i < 100; i++)
{
items[i] = list.Append(defaultClass, string.Format("{0} Item", i));
}
list.Show();
list.ItemSelected += List_ItemSelected;
+ GenListItem scroll = items[0];
+
box.PackEnd(list);
Button first = new Button(window)
{
@@ -76,9 +81,20 @@ namespace ElmSharp.Test
AlignmentX = -1,
WeightX = 1,
};
+ Button Add = new Button(window)
+ {
+ Text = "Add",
+ AlignmentX = -1,
+ WeightX = 1,
+ };
+ Add.Clicked += (s, e) =>
+ {
+ scroll = list.InsertBefore(defaultClass, string.Format("{0} Item", i++), scroll);
+ list.ScrollTo(scroll, ScrollToPosition.In, false);
+ };
first.Clicked += (s, e) =>
{
- list.ScrollTo(items[0], ScrollToPosition.In, true);
+ list.ScrollTo(scroll, ScrollToPosition.In, true);
};
last.Clicked += (s, e) =>
{
@@ -86,8 +102,10 @@ namespace ElmSharp.Test
};
first.Show();
last.Show();
+ Add.Show();
box.PackEnd(first);
box.PackEnd(last);
+ box.PackEnd(Add);
}