-
Notifications
You must be signed in to change notification settings - Fork 2
/
NameActivity.cs
102 lines (94 loc) · 3.52 KB
/
NameActivity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
using Android.App;
using Android.Dialog;
using Android.OS;
namespace DialogSampleApp
{
[Activity(Label = "Names")]
public class NameActivity : Activity {
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// create from view
var dialogListView = new DialogListView(this);
SetContentView(dialogListView);
RootElement root = new RootElement("Elements");
Section section = new Section();
root.Add(section);
foreach (var item in _names) {
section.Add(new StringElement(item.LastName, item.FirstName, Resource.Layout.custom_string_element));
}
dialogListView.Root = root;
}
class Name {
public Name(string first, string last)
{
FirstName = first;
LastName = last;
}
public string FirstName;
public string LastName;
}
private static Name[] _names = {
new Name("Kristina", "Chung"),
new Name("Paige", "Chen"),
new Name("Sherri", "Melton"),
new Name("Gretchen", "Hill"),
new Name("Karen", "Puckett"),
new Name("Patrick", "Song"),
new Name("Elsie", "Hamilton"),
new Name("Hazel", "Bender"),
new Name("Malcolm", "Wagner"),
new Name("Dolores", "McLaughlin"),
new Name("Francis", "McNamara"),
new Name("Sandy", "Raynor"),
new Name("Marion", "Moon"),
new Name("Beth", "Woodard"),
new Name("Julia", "Desai"),
new Name("Jerome", "Wallace"),
new Name("Neal", "Lawrence"),
new Name("Jean", "Griffin"),
new Name("Kristine", "Dougherty"),
new Name("Crystal", "Powers"),
new Name("Alex", "May"),
new Name("Eric", "Steele"),
new Name("Wesley", "Teague"),
new Name("Franklin", "Vick"),
new Name("Claire", "Gallagher"),
new Name("Marian", "Solomon"),
new Name("Marcia", "Walsh"),
new Name("Dwight", "Monroe"),
new Name("Wayne", "Connolly"),
new Name("Stephanie", "Hawkins"),
new Name("Neal", "Middleto"),
new Name("Gretchen", "Goldstein"),
new Name("Tim", "Watts"),
new Name("Jerome", "Johnston"),
new Name("Shelley", "Weeks"),
new Name("Priscilla", "Wilkerson"),
new Name("Elsie", "Barton"),
new Name("Beth", "Walton"),
new Name("Erica", "Hall"),
new Name("Douglas", "Ross"),
new Name("Donald", "Chung"),
new Name("Katherine", "Bender"),
new Name("Paul", "Woods"),
new Name("Patricia", "Mangum"),
new Name("Lois", "Joseph"),
new Name("Louis", "Rosenthal"),
new Name("Christina", "Bowden"),
new Name("Darlene", "Barton"),
new Name("Harvey", "Underwood"),
new Name("William", "Jones"),
new Name("Frederick", "Baker"),
new Name("Shirley", "Merritt"),
new Name("Jason", "Cross"),
new Name("Judith", "Cooper"),
new Name("Gretchen", "Holmes"),
new Name("Don", "Sharpe"),
new Name("Glenda", "Morgan"),
new Name("Scott", "Hoyle"),
new Name("Pat", "Allen"),
new Name("Michelle", "Rich"),
};
}
}