mirror of
https://github.com/bspeice/UNCCGameDay
synced 2024-11-05 07:38:13 -05:00
Tap to delete alerts from DB built back in
This commit is contained in:
parent
a71e43e12b
commit
d4413c46fd
@ -79,11 +79,12 @@ public class Home extends MenuActivity {
|
|||||||
new ArrayAdapter<Alert>(this,android.R.layout.simple_list_item_1, alerts);
|
new ArrayAdapter<Alert>(this,android.R.layout.simple_list_item_1, alerts);
|
||||||
listView.setAdapter(adapter);
|
listView.setAdapter(adapter);
|
||||||
|
|
||||||
//tap to delete alert from list
|
//tap to delete alert from list and database
|
||||||
listView.setOnItemClickListener(new OnItemClickListener() {
|
listView.setOnItemClickListener(new OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position,
|
public void onItemClick(AdapterView<?> parent, View view, int position,
|
||||||
long id) {
|
long id) {
|
||||||
|
deleteAlert(alerts.get(position));
|
||||||
alerts.remove(alerts.get(position));
|
alerts.remove(alerts.get(position));
|
||||||
listView.setAdapter(adapter);
|
listView.setAdapter(adapter);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user