-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHistoryActivity.cs
More file actions
49 lines (38 loc) · 1.57 KB
/
Copy pathHistoryActivity.cs
File metadata and controls
49 lines (38 loc) · 1.57 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
using Android.App;
using Android.Content;
using Android.OS;
using Android.Widget;
using System;
using System.Collections.Generic;
namespace TouchWalkthrough
{
[Activity(Label = "HistoryActivity", Theme = "@android:style/Theme.NoTitleBar")]
public class HistoryActivity : Activity
{
DropManager dropmanager = DropManager.Instance;
List<TableItem> tableItems = new List<TableItem>();
ListView listView;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.HomeScreen);
// Create your application here
listView = FindViewById<ListView>(Resource.Id.List);
dropmanager.getDrops().ForEach(drop => tableItems.Add(drop.ToTableItem()));
listView.Adapter = new HomeScreenAdapter(this, tableItems);
listView.ItemClick += OnListItemClick;
}
protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
{
var listView2 = sender as ListView;
var t = tableItems[e.Position];
//gebe Daten des drops an Activity DropDetailsActivity.cs weiter... ID des drops reicht eigentlich oder?
Intent intent = new Intent(this, typeof(DropDetailsActivity));
intent.PutExtra("ID", t.id.ToString());
StartActivity(intent);
//gebe Daten des drops an Activity DropDetailsActivity.cs weiter... ENDE
//StartActivity(typeof(DropDetailsActivity));
}
}
}