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

Commit 78ed7b80 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Clean up of the DatePicker"

parents 770e4e1e 13427a04
Loading
Loading
Loading
Loading
+22 −24
Original line number Diff line number Diff line
@@ -229,6 +229,7 @@ public class DatePicker extends FrameLayout {
        } else {
            setSpinnersShown(spinnersShown);
            setCalendarViewShown(calendarViewShown);
        }

        // set the min date giving priority of the minDate over startYear
        mTempDate.clear();
@@ -239,10 +240,9 @@ public class DatePicker extends FrameLayout {
        } else {
            mTempDate.set(startYear, 0, 1);
        }
            mMinDate.clear();
        setMinDate(mTempDate.getTimeInMillis());

            // set the max date giving priority of the minDate over startYear
        // set the max date giving priority of the maxDate over endYear
        mTempDate.clear();
        if (!TextUtils.isEmpty(maxDate)) {
            if (!parseDate(maxDate, mTempDate)) {
@@ -251,14 +251,12 @@ public class DatePicker extends FrameLayout {
        } else {
            mTempDate.set(endYear, 11, 31);
        }
            mMaxDate.clear();
        setMaxDate(mTempDate.getTimeInMillis());

        // initialize to current date
        mCurrentDate.setTimeInMillis(System.currentTimeMillis());
        init(mCurrentDate.get(Calendar.YEAR), mCurrentDate.get(Calendar.MONTH), mCurrentDate
                .get(Calendar.DAY_OF_MONTH), null);
        }

        // re-order the number spinners to match the current date format
        reorderSpinners();
+0 −5
Original line number Diff line number Diff line
@@ -3146,11 +3146,6 @@
        <attr name="layout" />
    </declare-styleable>

    <declare-styleable name="DatePicker">
        <!-- @hide The layout of the time picker. -->
        <attr name="layout" />
    </declare-styleable>

    <!-- ========================= -->
    <!-- Drawable class attributes -->
    <!-- ========================= -->