-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMainActivity.cs
44 lines (40 loc) · 1.35 KB
/
MainActivity.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
using Android.App;
using Android.Widget;
using Android.OS;
using Wahid.SwipemenuListview;
using Android.Graphics.Drawables;
using Android.Graphics;
namespace Wahid
{
[Activity(Label = "Swipe Menu ListView", MainLauncher = true)]
public class MainActivity : Activity, ISwipeMenuCreator, IOnMenuItemClickListener
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.Main);
SwipeMenuListView listView = FindViewById<SwipeMenuListView>(Resource.Id.listView);
}
public void Create(SwipeMenu menu)
{
SwipeMenuItem callItem = new SwipeMenuItem(this)
{
Width = 200,
Background = new ColorDrawable(Color.AliceBlue),
IconRes = Resource.Drawable.phone_co
};
menu.AddMenuItem(callItem);
SwipeMenuItem copyItem = new SwipeMenuItem(this)
{
Background = new ColorDrawable(Color.Azure),
Width = (200),
IconRes = Resource.Drawable.copy
};
menu.AddMenuItem(copyItem);
}
public bool OnMenuItemClick(int position, SwipeMenu menu, int index)
{
throw new System.NotImplementedException();
}
}
}