forked from Clancey/MonoDroid.Dialog
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRadioElement.cs
36 lines (30 loc) · 865 Bytes
/
RadioElement.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
using System;
using Android.Content;
using Android.Views;
namespace Android.Dialog
{
public class RadioElement : StringElement
{
public string Group;
internal int RadioIdx;
public RadioElement(string caption, string group)
: base(caption)
{
Group = group;
}
public RadioElement(string caption)
: base(caption)
{
}
public override View GetView(Context context, View convertView, ViewGroup parent)
{
if (!(((RootElement)Parent.Parent)._group is RadioGroup))
throw new Exception("The RootElement's Group is null or is not a RadioGroup");
return base.GetView(context, convertView, parent);
}
public override string Summary()
{
return Caption;
}
}
}