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

Commit dcdce773 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Material theme"

parents 08d3775c 830960cc
Loading
Loading
Loading
Loading
+202 −202

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ import java.util.Map;
 * select items accessible directly from the action bar as "action items". You can also
 * modify various characteristics of the action bar or remove it completely.</p>
 *
 * <p>When using the Quantum themes (default in API 21 or newer) the navigation button
 * <p>When using the Material themes (default in API 21 or newer) the navigation button
 * (formerly "Home") takes over the space previously occupied by the application icon.
 * Apps wishing to express a stronger branding should use their brand colors heavily
 * in the action bar and other application chrome or use a {@link #setLogo(int) logo}
+11 −11
Original line number Diff line number Diff line
@@ -2499,7 +2499,7 @@ public class Notification implements Parcelable

        /**
         * @return Whether we are currently building a notification from a legacy (an app that
         *         doesn't create quantum notifications by itself) app.
         *         doesn't create material notifications by itself) app.
         */
        private boolean isLegacy() {
            return mColorUtil != null;
@@ -2719,31 +2719,31 @@ public class Notification implements Parcelable


        private int getBaseLayoutResource() {
            return R.layout.notification_template_quantum_base;
            return R.layout.notification_template_material_base;
        }

        private int getBigBaseLayoutResource() {
            return R.layout.notification_template_quantum_big_base;
            return R.layout.notification_template_material_big_base;
        }

        private int getBigPictureLayoutResource() {
            return R.layout.notification_template_quantum_big_picture;
            return R.layout.notification_template_material_big_picture;
        }

        private int getBigTextLayoutResource() {
            return R.layout.notification_template_quantum_big_text;
            return R.layout.notification_template_material_big_text;
        }

        private int getInboxLayoutResource() {
            return R.layout.notification_template_quantum_inbox;
            return R.layout.notification_template_material_inbox;
        }

        private int getActionLayoutResource() {
            return R.layout.notification_quantum_action;
            return R.layout.notification_material_action;
        }

        private int getActionTombstoneLayoutResource() {
            return R.layout.notification_quantum_action_tombstone;
            return R.layout.notification_material_action_tombstone;
        }
    }

@@ -3238,7 +3238,7 @@ public class Notification implements Parcelable
        private RemoteViews generateMediaActionButton(Action action) {
            final boolean tombstone = (action.actionIntent == null);
            RemoteViews button = new RemoteViews(mBuilder.mContext.getPackageName(),
                    R.layout.notification_quantum_media_action);
                    R.layout.notification_material_media_action);
            button.setImageViewResource(R.id.action0, action.icon);
            if (!tombstone) {
                button.setOnClickPendingIntent(R.id.action0, action.actionIntent);
@@ -3249,7 +3249,7 @@ public class Notification implements Parcelable

        private RemoteViews makeMediaContentView() {
            RemoteViews view = mBuilder.applyStandardTemplate(
                    R.layout.notification_template_quantum_media, true /* 1U */);
                    R.layout.notification_template_material_media, true /* 1U */);

            final int numActions = mBuilder.mActions.size();
            final int N = mActionsToShowInCompact == null
@@ -3274,7 +3274,7 @@ public class Notification implements Parcelable

        private RemoteViews makeMediaBigContentView() {
            RemoteViews big = mBuilder.applyStandardTemplate(
                    R.layout.notification_template_quantum_big_media, false);
                    R.layout.notification_template_material_big_media, false);

            final int N = Math.min(mBuilder.mActions.size(), MAX_MEDIA_BUTTONS);
            if (N > 0) {
+12 −12
Original line number Diff line number Diff line
@@ -317,13 +317,13 @@ public class RadialTimePickerView extends View implements View.OnTouchListener {
        final Resources res = getResources();

        mAmPmUnselectedColor = a.getColor(R.styleable.TimePicker_amPmUnselectedBackgroundColor,
                res.getColor(R.color.timepicker_default_ampm_unselected_background_color_quantum));
                res.getColor(R.color.timepicker_default_ampm_unselected_background_color_material));

        mAmPmSelectedColor = a.getColor(R.styleable.TimePicker_amPmSelectedBackgroundColor,
                res.getColor(R.color.timepicker_default_ampm_selected_background_color_quantum));
                res.getColor(R.color.timepicker_default_ampm_selected_background_color_material));

        mAmPmTextColor = a.getColor(R.styleable.TimePicker_amPmTextColor,
                res.getColor(R.color.timepicker_default_text_color_quantum));
                res.getColor(R.color.timepicker_default_text_color_material));

        mTypeface = Typeface.create("sans-serif", Typeface.NORMAL);

@@ -338,7 +338,7 @@ public class RadialTimePickerView extends View implements View.OnTouchListener {
        }

        final int numbersTextColor = a.getColor(R.styleable.TimePicker_numbersTextColor,
                res.getColor(R.color.timepicker_default_text_color_quantum));
                res.getColor(R.color.timepicker_default_text_color_material));

        mPaint[HOURS] = new Paint();
        mPaint[HOURS].setAntiAlias(true);
@@ -358,39 +358,39 @@ public class RadialTimePickerView extends View implements View.OnTouchListener {
        mPaintSelector[HOURS][SELECTOR_CIRCLE].setAntiAlias(true);
        mColorSelector[HOURS][SELECTOR_CIRCLE] = a.getColor(
                R.styleable.TimePicker_numbersSelectorColor,
                R.color.timepicker_default_selector_color_quantum);
                R.color.timepicker_default_selector_color_material);

        mPaintSelector[HOURS][SELECTOR_DOT] = new Paint();
        mPaintSelector[HOURS][SELECTOR_DOT].setAntiAlias(true);
        mColorSelector[HOURS][SELECTOR_DOT] = a.getColor(
                R.styleable.TimePicker_numbersSelectorColor,
                R.color.timepicker_default_selector_color_quantum);
                R.color.timepicker_default_selector_color_material);

        mPaintSelector[HOURS][SELECTOR_LINE] = new Paint();
        mPaintSelector[HOURS][SELECTOR_LINE].setAntiAlias(true);
        mPaintSelector[HOURS][SELECTOR_LINE].setStrokeWidth(2);
        mColorSelector[HOURS][SELECTOR_LINE] = a.getColor(
                R.styleable.TimePicker_numbersSelectorColor,
                R.color.timepicker_default_selector_color_quantum);
                R.color.timepicker_default_selector_color_material);

        mPaintSelector[MINUTES][SELECTOR_CIRCLE] = new Paint();
        mPaintSelector[MINUTES][SELECTOR_CIRCLE].setAntiAlias(true);
        mColorSelector[MINUTES][SELECTOR_CIRCLE] = a.getColor(
                R.styleable.TimePicker_numbersSelectorColor,
                R.color.timepicker_default_selector_color_quantum);
                R.color.timepicker_default_selector_color_material);

        mPaintSelector[MINUTES][SELECTOR_DOT] = new Paint();
        mPaintSelector[MINUTES][SELECTOR_DOT].setAntiAlias(true);
        mColorSelector[MINUTES][SELECTOR_DOT] = a.getColor(
                R.styleable.TimePicker_numbersSelectorColor,
                R.color.timepicker_default_selector_color_quantum);
                R.color.timepicker_default_selector_color_material);

        mPaintSelector[MINUTES][SELECTOR_LINE] = new Paint();
        mPaintSelector[MINUTES][SELECTOR_LINE].setAntiAlias(true);
        mPaintSelector[MINUTES][SELECTOR_LINE].setStrokeWidth(2);
        mColorSelector[MINUTES][SELECTOR_LINE] = a.getColor(
                R.styleable.TimePicker_numbersSelectorColor,
                R.color.timepicker_default_selector_color_quantum);
                R.color.timepicker_default_selector_color_material);

        mPaintAmPmText.setColor(mAmPmTextColor);
        mPaintAmPmText.setTypeface(mTypeface);
@@ -403,11 +403,11 @@ public class RadialTimePickerView extends View implements View.OnTouchListener {
        mPaintAmPmCircle[PM].setAntiAlias(true);

        mPaintBackground.setColor(a.getColor(R.styleable.TimePicker_numbersBackgroundColor,
                res.getColor(R.color.timepicker_default_numbers_background_color_quantum)));
                res.getColor(R.color.timepicker_default_numbers_background_color_material)));
        mPaintBackground.setAntiAlias(true);

        mPaintDisabled.setColor(a.getColor(R.styleable.TimePicker_disabledColor,
                res.getColor(R.color.timepicker_default_disabled_color_quantum)));
                res.getColor(R.color.timepicker_default_disabled_color_material)));
        mPaintDisabled.setAntiAlias(true);

        if (DEBUG) {
+4 −4
Original line number Diff line number Diff line
@@ -140,12 +140,12 @@ class TimePickerDelegate extends TimePicker.AbstractTimePickerDelegate implement
        mSelectMinutes = res.getString(R.string.select_minutes);

        mHeaderSelectedColor = a.getColor(R.styleable.TimePicker_headerSelectedTextColor,
                R.color.timepicker_default_selector_color_quantum);
                R.color.timepicker_default_selector_color_material);

        mHeaderUnSelectedColor = getUnselectedColor(R.color.timepicker_default_text_color_quantum);
        mHeaderUnSelectedColor = getUnselectedColor(R.color.timepicker_default_text_color_material);
        if (mHeaderUnSelectedColor == -1) {
            mHeaderUnSelectedColor = a.getColor(R.styleable.TimePicker_headerUnselectedTextColor,
                    R.color.timepicker_default_text_color_quantum);
                    R.color.timepicker_default_text_color_material);
        }

        final int headerBackgroundColor = a.getColor(
@@ -295,7 +295,7 @@ class TimePickerDelegate extends TimePicker.AbstractTimePickerDelegate implement
        TypedArray a = mContext.obtainStyledAttributes(TEXT_APPEARANCE_TIME_LABEL_ATTR);
        final int textAppearanceResId = a.getResourceId(0, 0);
        tempView.setTextAppearance(mContext, (textAppearanceResId != 0) ?
                textAppearanceResId : R.style.TextAppearance_Quantum_TimePicker_TimeLabel);
                textAppearanceResId : R.style.TextAppearance_Material_TimePicker_TimeLabel);
        a.recycle();
        ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT);
Loading