diff --git a/res/layout/edit_event_1.xml b/res/layout/edit_event_1.xml index aaa6bdd40fa67faf8698a7faf8a496b64bf46f75..3ed49b957a6464132f178611efc8e797bc86b412 100644 --- a/res/layout/edit_event_1.xml +++ b/res/layout/edit_event_1.xml @@ -25,7 +25,7 @@ + android:paddingBottom="5dip" + android:orientation="horizontal" + android:layout_marginBottom="5dp" + > + + android:textColor="@color/color_default_primary_text" /> diff --git a/res/values/colors.xml b/res/values/colors.xml index 9636878dc506e26f5e0b59e82a2b797d8a1ce631..6c81f2e6109406adc6e7c235bd9b6ec711c3139a 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -104,7 +104,7 @@ #FFDDDDDD - @lineageos.platform:color/color_default_blue1 + @lineageos.platform:color/color_default_foreground #FFFFFFFF #FFF2F2F2 #FFEEEEEE diff --git a/res/values/styles.xml b/res/values/styles.xml index 320bf4bbc37bfd066bac9cf01f2ebe2dde258dbe..6d74ebf544aed554eb327807fde953f9c5eae83b 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -303,4 +303,10 @@ + + diff --git a/src/com/android/calendar/AboutActivity.kt b/src/com/android/calendar/AboutActivity.kt index 8ce1227f24a00c1db384886eba3f7aa5d2d9291a..d831d362db469662d08a88e8eed6c262aafc5625 100644 --- a/src/com/android/calendar/AboutActivity.kt +++ b/src/com/android/calendar/AboutActivity.kt @@ -16,7 +16,7 @@ class AboutActivity : AppCompatActivity() { setContentView(R.layout.simple_frame_layout_material) val toolbar = findViewById(R.id.toolbar) - toolbar.setTitleTextColor(resources.getColor(R.color.color_default_blue1)) + toolbar.setTitleTextColor(resources.getColor(R.color.color_default_primary_text)) toolbar.setSubtitleTextColor(resources.getColor(R.color.color_default_blue1)) setSupportActionBar(toolbar) supportActionBar?.setDisplayHomeAsUpEnabled(true) diff --git a/src/com/android/calendar/AllInOneActivity.java b/src/com/android/calendar/AllInOneActivity.java index 9eb43d66b75229af84e7c67e265b89c472c75e81..cc59eeeec089ef4fff09b22641f66590c93a4589 100644 --- a/src/com/android/calendar/AllInOneActivity.java +++ b/src/com/android/calendar/AllInOneActivity.java @@ -462,6 +462,7 @@ public class AllInOneActivity extends AbstractCalendarActivity implements EventH private void setupToolbar(int viewType) { mToolbar = (Toolbar) findViewById(R.id.toolbar); + mToolbar.setTitleTextColor(this.getResources().getColor(R.color.color_default_primary_text)); if (mToolbar == null) { if (DEBUG) { Log.d(TAG, "Didn't find a toolbar"); diff --git a/src/com/android/calendar/CalendarToolbarHandler.java b/src/com/android/calendar/CalendarToolbarHandler.java index 3ab2de35df4a983a4ecb048e9b5907e7369978ed..141238832e3e8de6ed1295b8964cc784f3de41e0 100644 --- a/src/com/android/calendar/CalendarToolbarHandler.java +++ b/src/com/android/calendar/CalendarToolbarHandler.java @@ -42,6 +42,7 @@ public class CalendarToolbarHandler { public CalendarToolbarHandler(AppCompatActivity context, Toolbar toolbar, int defaultViewType) { mContext = context; mToolbar = toolbar; + mToolbar.setSubtitleTextColor(context.getResources().getColor(R.color.color_default_primary_text)); mCurrentViewType = defaultViewType; mMidnightHandler = new Handler(); @@ -80,6 +81,7 @@ public class CalendarToolbarHandler { switch (mCurrentViewType) { case CalendarController.ViewType.DAY: mToolbar.setSubtitle(buildDayOfWeek()); + mToolbar.setTitle(buildFullDate()); break; case CalendarController.ViewType.WEEK: diff --git a/src/com/android/calendar/event/EditEventView.java b/src/com/android/calendar/event/EditEventView.java index 88337adc19ececfd4283e239d28b1589c2f68d04..1fcddf81e7928b06ae7f8288a6472f11256ef1ae 100644 --- a/src/com/android/calendar/event/EditEventView.java +++ b/src/com/android/calendar/event/EditEventView.java @@ -121,6 +121,8 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa * and zero commas, should insert an extra comma (followed by the space). */ private static InputFilter[] sRecipientFilters = new InputFilter[]{new Rfc822InputFilter()}; + private final View calendar_selector_group_view; + private final View calendar_group_view; public boolean mIsMultipane; ArrayList mEditOnlyList = new ArrayList(); ArrayList mEditViewList = new ArrayList(); @@ -259,6 +261,8 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa mAvailabilitySpinner = (Spinner) view.findViewById(R.id.availability); mAccessLevelSpinner = (Spinner) view.findViewById(R.id.visibility); mCalendarSelectorGroup = view.findViewById(R.id.calendar_selector_group); + calendar_selector_group_view = view.findViewById(R.id.calendar_selector_group_view); + calendar_group_view = view.findViewById(R.id.calendar_group_view); mCalendarSelectorWrapper = view.findViewById(R.id.calendar_selector_wrapper); mCalendarStaticGroup = view.findViewById(R.id.calendar_group); mRemindersGroup = view.findViewById(R.id.reminders_row); @@ -982,7 +986,8 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa mView.findViewById(R.id.calendar_textview_with_colorpicker) .setBackgroundColor(displayColor); } else { - mView.findViewById(R.id.calendar_group).setBackgroundColor(displayColor); + //mView.findViewById(R.id.calendar_group).setBackgroundColor(displayColor); + calendar_group_view.setBackgroundColor(displayColor); } } else { setSpinnerBackgroundColor(displayColor); @@ -993,7 +998,9 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa if (mIsMultipane) { mCalendarSelectorWrapper.setBackgroundColor(displayColor); } else { - mCalendarSelectorGroup.setBackgroundColor(displayColor); + calendar_selector_group_view.setBackgroundColor(displayColor); + //calendar_group_view.setBackgroundColor(displayColor); + } } @@ -1701,14 +1708,14 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa if (mStartTimePickerDialog != null) { mStartTimePickerDialog.dismiss(); } - mStartTimePickerDialog = new TimePickerDialog(mActivity, new TimeListener(v), + mStartTimePickerDialog = new TimePickerDialog(mActivity, R.style.datepicker, new TimeListener(v), mTime.hour, mTime.minute, DateFormat.is24HourFormat(mActivity)); dialog = mStartTimePickerDialog; } else { if (mEndTimePickerDialog != null) { mEndTimePickerDialog.dismiss(); } - mEndTimePickerDialog = new TimePickerDialog(mActivity, new TimeListener(v), + mEndTimePickerDialog = new TimePickerDialog(mActivity, R.style.datepicker, new TimeListener(v), mTime.hour, mTime.minute, DateFormat.is24HourFormat(mActivity)); dialog = mEndTimePickerDialog; @@ -1800,8 +1807,9 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa if (mDatePickerDialog != null) { mDatePickerDialog.dismiss(); } - mDatePickerDialog = new DatePickerDialog(mActivity, listener, + mDatePickerDialog = new DatePickerDialog(mActivity, R.style.datepicker, listener, mTime.year, mTime.month, mTime.monthDay); + mDatePickerDialog.show(); } } diff --git a/src/com/android/calendar/month/MonthWeekEventsView.java b/src/com/android/calendar/month/MonthWeekEventsView.java index df25f2d3de379ef5bb927e5c1ef9357c7b62d204..2e53a97ab433143e22aa31597b9f755f5fddd720 100644 --- a/src/com/android/calendar/month/MonthWeekEventsView.java +++ b/src/com/android/calendar/month/MonthWeekEventsView.java @@ -158,6 +158,7 @@ public class MonthWeekEventsView extends SimpleWeekView { private ObjectAnimator mTodayAnimator = null; private int[] mDayXs; + /** * Shows up as an error if we don't include this. */ @@ -319,6 +320,9 @@ public class MonthWeekEventsView extends SimpleWeekView { mMonthNumAscentHeight = (int) (-mMonthNumPaint.ascent() + 0.5f); mMonthNumHeight = (int) (mMonthNumPaint.descent() - mMonthNumPaint.ascent() + 0.5f); + + + mEventPaint = new TextPaint(); mEventPaint.setFakeBoldText(true); mEventPaint.setAntiAlias(true); @@ -456,7 +460,7 @@ public class MonthWeekEventsView extends SimpleWeekView { drawWeekNums(canvas); drawDaySeparators(canvas); if (mHasToday && mAnimateToday) { - drawToday(canvas); + drawToday(canvas); } if (mShowDetailsInMonth) { drawEvents(canvas); @@ -513,7 +517,7 @@ public class MonthWeekEventsView extends SimpleWeekView { } p.setColor(mDaySeparatorInnerColor); p.setStrokeWidth(mDaySeparatorInnerWidth); - canvas.drawLines(lines, 0, lines.length, p); + // canvas.drawLines(lines, 0, lines.length, p); } @Override @@ -616,20 +620,27 @@ public class MonthWeekEventsView extends SimpleWeekView { time.setJulianDay(julianMonday); for (; i < numCount; i++) { + x = computeDayLeftPosition(i - offset) - (mSidePaddingMonthNumber); + if (mHasToday && todayIndex == i) { - mMonthNumPaint.setColor(mMonthNumTodayColor); + mMonthNumPaint.setFakeBoldText(isBold = true); if (i + 1 < numCount) { // Make sure the color will be set back on the next // iteration isFocusMonth = !mFocusDay[i + 1]; } + mMonthNumPaint.setColor(getContext().getResources().getColor(R.color.color_default_blue1)); + canvas.drawCircle(x-35, y-22, 40,mMonthNumPaint); + mMonthNumPaint.setColor(mMonthNumTodayColor); } else if (mFocusDay[i] != isFocusMonth) { isFocusMonth = mFocusDay[i]; mMonthNumPaint.setColor(isFocusMonth ? mMonthNumColor : mMonthNumOtherColor); } - x = computeDayLeftPosition(i - offset) - (mSidePaddingMonthNumber); - canvas.drawText(mDayNumbers[i], x, y, mMonthNumPaint); + double relation = Math.sqrt(canvas.getWidth() * canvas.getHeight()); + mMonthNumPaint.setTextSize((int)relation / 12); + canvas.drawText(mDayNumbers[i], x-12, y-5, mMonthNumPaint); + if (isBold) { mMonthNumPaint.setFakeBoldText(isBold = false); } @@ -681,7 +692,7 @@ public class MonthWeekEventsView extends SimpleWeekView { infoX = x; infoY = y + (mMonthNumHeight + mLunarPaddingLunar) * (num + 1); } - canvas.drawText(info, infoX, infoY, mMonthNumPaint); + canvas.drawText(info, infoX, infoY, mMonthNumPaint); num = num + 1; } diff --git a/src/com/android/calendar/settings/SettingsActivity.kt b/src/com/android/calendar/settings/SettingsActivity.kt index 1a22a289dd9a490b3f80a1e7b2f5036dbc0d24e0..d9a0d03885e28c11f9f55e9dac86e9aba8cb5551 100644 --- a/src/com/android/calendar/settings/SettingsActivity.kt +++ b/src/com/android/calendar/settings/SettingsActivity.kt @@ -56,7 +56,7 @@ class SettingsActivity : AppCompatActivity(), setContentView(R.layout.simple_frame_layout_material) val toolbar = findViewById(R.id.toolbar) - toolbar.setTitleTextColor(resources.getColor(R.color.color_default_blue1)) + toolbar.setTitleTextColor(resources.getColor(R.color.color_default_primary_text)) toolbar.setSubtitleTextColor(resources.getColor(R.color.color_default_blue1)) setSupportActionBar(toolbar)