-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomMessageDialog.cs
45 lines (41 loc) · 1.44 KB
/
CustomMessageDialog.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace ImageSlider.MyTest
{
class CustomMessageDialog : Dialog
{
ICustomMessageInterface custommessageinterface;
public CustomMessageDialog(Activity activity,ICustomMessageInterface custommessageinterface) : base(activity)
{
this.custommessageinterface = custommessageinterface;
}
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
RequestWindowFeature((int)WindowFeatures.NoTitle);
SetContentView(Resource.Layout.customMessageDialog);
this.Window.Attributes.WindowAnimations = Resource.Style.DialogAnimation;
TextView cancel = (TextView)FindViewById(Resource.Id.button_cancel);
TextView submit = (TextView)FindViewById(Resource.Id.submit_button);
cancel.Click += Cancel_Click;
submit.Click += Submit_Click;
}
private void Submit_Click(object sender, EventArgs e)
{
Dismiss();
custommessageinterface.CustomMessageCallBack();
}
private void Cancel_Click(object sender, EventArgs e)
{
Dismiss();
}
}
}