From a325a3de9a8ad11ee436be48330345396640d7cf Mon Sep 17 00:00:00 2001 From: John Janus Date: Sun, 7 Apr 2013 00:26:05 +0200 Subject: [PATCH] added bool for holidays --- src/de/rhinapotheke/notdienst/MainActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/rhinapotheke/notdienst/MainActivity.java b/src/de/rhinapotheke/notdienst/MainActivity.java index 535b009..8bf7cf8 100644 --- a/src/de/rhinapotheke/notdienst/MainActivity.java +++ b/src/de/rhinapotheke/notdienst/MainActivity.java @@ -14,6 +14,7 @@ import android.app.DatePickerDialog; public class MainActivity extends Activity { + boolean holiday = false; Calendar cal; DateFormat fmtDate; Button dateLabel; @@ -74,7 +75,7 @@ public class MainActivity extends Activity { private void updateDateLabel() { dateLabel.setText(fmtDate.format(cal.getTime())); - if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) { + if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY || holiday) { ((TextView) findViewById(R.id.text_gl)).setText(R.string.glue_so_hol); } else if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) { ((TextView) findViewById(R.id.text_gl)).setText(R.string.glue_sa); -- 2.47.0