forked from sam-lippert/Android.Dialog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActivity2.cs
More file actions
executable file
·83 lines (76 loc) · 3.13 KB
/
Activity2.cs
File metadata and controls
executable file
·83 lines (76 loc) · 3.13 KB
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
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Content.PM;
using Android.Dialog;
using Android.Graphics;
namespace DialogSampleApp
{
[Activity(Label = "MonoDroidDialogApp",
WindowSoftInputMode = SoftInput.AdjustPan,
ConfigurationChanges = ConfigChanges.KeyboardHidden | ConfigChanges.Orientation,
LaunchMode = LaunchMode.SingleTop)]
public class Activity2 : DialogActivity
{
protected override void OnCreate(Bundle bundle)
{
InitializeRoot();
base.OnCreate(bundle);
}
void InitializeRoot()
{
var imageView = new ImageView(this);
imageView.SetImageResource (Resource.Drawable.icon);
this.Root = new RootElement("Elements")
{
new Section("Element w/Format Overrides")
{
new CheckboxElement("CheckboxElement", true, "", Resource.Layout.dialog_boolfieldsubright),
new StringElement("String Element", "Value", Resource.Layout.dialog_labelfieldbelow),
new EntryElement("EntryElement", "", Resource.Layout.dialog_textfieldbelow) { Hint = "Plain" },
new EntryElement("PasswordEntryElement", "Va", Resource.Layout.dialog_textfieldbelow) { Hint = "Password", Password = true },
new EntryElement("EntryElement2", "Val", Resource.Layout.dialog_textfieldbelow) { Hint = "Plain3" },
},
new Section("Section")
{
new BooleanElement("BooleanElement", true),
new StringElement("StringElement", "Value"),
new EntryElement("EntryElement", "") { Hint = "Pain 2" },
new EntryElement("PasswordEntryElement", "") { Hint = "Password 2", Password = true },
new DateTimeElement("DateTimeElement", DateTime.Now),
new DateElement("DateElement", DateTime.Now),
new TimeElement("TimeElement", DateTime.Now),
new CheckboxElement("CheckboxElement", true),
new HtmlElement("HtmlElement (Link)","http://www.google.com"),
new ImageElement(imageView),
new MultilineElement("MultiLineElement", "The quick brown fox jumped over the lazy horse, the quick brown fox jumped over the lazy horse"),
new FloatElement("Range"),
},
new Section("Groups")
{
new [] {
new RootElement("Radio Group", new Android.Dialog.RadioGroup("desert", 2))
{
new Section ()
{
new RadioElement ("Ice Cream", "desert"),
new RadioElement ("Milkshake", "desert"),
new RadioElement ("Chocolate Cake", "desert")
},
new Section ()
{
new RadioElement ("Ice Cream", "desert"),
new RadioElement ("Milkshake", "desert"),
new RadioElement ("Chocolate Cake", "desert")
}
}
}
}
};
}
}
}