From 2ef1c73df1d7cc59b6cf596c437d335777527ec1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 Jul 2016 22:10:37 +0200 Subject: [PATCH] style a couple more components --- .../simplemobiletools/calendar/activities/DayActivity.java | 6 ++++-- .../simplemobiletools/calendar/activities/MainActivity.java | 3 ++- app/src/main/res/values/styles.xml | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/calendar/activities/DayActivity.java b/app/src/main/java/com/simplemobiletools/calendar/activities/DayActivity.java index ac074a140..03f50eddf 100644 --- a/app/src/main/java/com/simplemobiletools/calendar/activities/DayActivity.java +++ b/app/src/main/java/com/simplemobiletools/calendar/activities/DayActivity.java @@ -74,7 +74,8 @@ public class DayActivity extends SimpleActivity mDateTV.setText(date); mToBeDeleted = new ArrayList<>(); - final int textColor = Utils.adjustAlpha(Color.BLACK, Constants.HIGH_ALPHA); + final int baseColor = mConfig.getIsDarkTheme() ? Color.WHITE : Color.BLACK; + final int textColor = Utils.adjustAlpha(baseColor, Constants.HIGH_ALPHA); mLeftArrow.getDrawable().mutate().setColorFilter(textColor, PorterDuff.Mode.SRC_ATOP); mRightArrow.getDrawable().mutate().setColorFilter(textColor, PorterDuff.Mode.SRC_ATOP); } @@ -114,7 +115,8 @@ public class DayActivity extends SimpleActivity @OnClick(R.id.top_text) public void pickDay() { - final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this, R.style.MyAlertDialog); + final int theme = mConfig.getIsDarkTheme() ? R.style.MyAlertDialog_Dark : R.style.MyAlertDialog; + final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this, theme); final View view = getLayoutInflater().inflate(R.layout.date_picker, null); final DatePicker datePicker = (DatePicker) view.findViewById(R.id.date_picker); diff --git a/app/src/main/java/com/simplemobiletools/calendar/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/calendar/activities/MainActivity.java index d63e2a2bc..7209e2d9a 100644 --- a/app/src/main/java/com/simplemobiletools/calendar/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/calendar/activities/MainActivity.java @@ -176,7 +176,8 @@ public class MainActivity extends SimpleActivity implements Calendar { @OnClick(R.id.top_text) public void pickMonth() { - final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this, R.style.MyAlertDialog); + final int theme = mConfig.getIsDarkTheme() ? R.style.MyAlertDialog_Dark : R.style.MyAlertDialog; + final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this, theme); final View view = getLayoutInflater().inflate(R.layout.date_picker, null); final DatePicker datePicker = (DatePicker) view.findViewById(R.id.date_picker); hideDayPicker(datePicker); diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 8861b4a12..2f3bb9909 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -53,6 +53,8 @@