forked from nomad23/myspacecalandroid2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAgileListViewActivity.java
More file actions
66 lines (55 loc) · 1.99 KB
/
Copy pathAgileListViewActivity.java
File metadata and controls
66 lines (55 loc) · 1.99 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package space.apps.challenge;
import java.util.ArrayList;
import java.util.List;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.ListView;
import space.apps.challenge.entities.Agile;
import space.apps.challenge.util.Assets;
public class AgileListViewActivity extends ListActivity implements Runnable {
List<Agile> Agiles;
@Override
public void onCreate(Bundle icicle) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(icicle);
Assets.context = this;
setContentView(R.layout.main);
LinearLayout linear = (LinearLayout) findViewById(R.id.layout);
linear.setBackgroundColor(Color.WHITE);
Assets.progressDialog = ProgressDialog.show(this, "", "Loading Results..", true, true);
Thread t = new Thread(this);
t.start();
}
private List<Agile> getModel() {
Agiles = new ArrayList<Agile>();
//add notifications to the array adapter.
for (Agile s : Assets.agile_messages.getData()) {
Agiles.add(s);
}
return Agiles;
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
// WAPod pod = pods.get(position);
// new CustomSimpleDialog(this, pod.getType(), n.getText(), "Close");
}
public void run() {
ArrayAdapter<Agile> adapter = new AgileArrayAdapter(this, getModel());
setListAdapter(adapter);
Assets.progressDialog.dismiss();
}
}