-
Notifications
You must be signed in to change notification settings - Fork 0
/
AboutExamAdapter.cs
78 lines (62 loc) · 1.94 KB
/
AboutExamAdapter.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
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.Adapter
{
class AboutExamAdapter : BaseAdapter
{
Context context;
public AboutExamAdapter(Context context)
{
this.context = context;
}
public override Java.Lang.Object GetItem(int position)
{
return position;
}
public override long GetItemId(int position)
{
return position;
}
public override View GetView(int position, View convertView, ViewGroup parent)
{
var view = convertView;
AboutExamAdapterViewHolder holder = null;
if (view != null)
holder = view.Tag as AboutExamAdapterViewHolder;
if (holder == null)
{
holder = new AboutExamAdapterViewHolder();
var inflater = context.GetSystemService(Context.LayoutInflaterService).JavaCast<LayoutInflater>();
//replace with your item and your holder items
//comment back in
//view = inflater.Inflate(Resource.Layout.item, parent, false);
//holder.Title = view.FindViewById<TextView>(Resource.Id.text);
view.Tag = holder;
}
//fill in your items
//holder.Title.Text = "new text here";
return view;
}
//Fill in cound here, currently 0
public override int Count
{
get
{
return 0;
}
}
}
class AboutExamAdapterViewHolder : Java.Lang.Object
{
//Your adapter views to re-use
//public TextView Title { get; set; }
}
}