Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20277b83 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Set "today" and "selected" for Datepicker when using Calender"

parents be69644c 7eef9a1a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.icu.text.DisplayContext;
import android.icu.text.RelativeDateTimeFormatter;
import android.icu.text.SimpleDateFormat;
import android.icu.util.Calendar;
import android.os.Bundle;
@@ -1095,6 +1096,14 @@ class SimpleMonthView extends View {

            node.setText(getDayText(virtualViewId));
            node.setContentDescription(getDayDescription(virtualViewId));
            if (virtualViewId == mToday) {
                RelativeDateTimeFormatter fmt = RelativeDateTimeFormatter.getInstance();
                node.setStateDescription(fmt.format(RelativeDateTimeFormatter.Direction.THIS,
                        RelativeDateTimeFormatter.AbsoluteUnit.DAY));
            }
            if (virtualViewId == mActivatedDay) {
                node.setSelected(true);
            }
            node.setBoundsInParent(mTempRect);

            final boolean isDayEnabled = isDayEnabled(virtualViewId);