UI updates

This commit is contained in:
RowenaWinston
2013-10-30 14:15:38 -04:00
parent 264c6020ea
commit 251a41eb67
6 changed files with 69 additions and 23 deletions

View File

@ -6,18 +6,37 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TableLayout;
import com.uncc.gameday.R;
import com.uncc.gameday.alerts.AlertService;
public class Home extends MenuActivity {
private TableLayout alertsScrollView;
Button clearAlertsButton;
Button getAlertsButton;
private final long alarmRate = 300000; // 5 Minutes
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
alertsScrollView = (TableLayout) findViewById(R.id.alertsScrollView);
clearAlertsButton = (Button) findViewById(R.id.clearAlertsButton);
getAlertsButton = (Button) findViewById(R.id.getAlertsButton);
clearAlertsButton.setOnClickListener(clearAlertsButtonListener);
getAlertsButton.setOnClickListener(getAlertsButtonListener);
updateAlertsList(null);
// Start up the AlarmManager to fetch alerts in the background
AlarmManager am = (AlarmManager) this.getSystemService(ALARM_SERVICE);
Intent alertFetcher = new Intent(this, AlertService.class);