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

Commit 2810a317 authored by Annie Chin's avatar Annie Chin Committed by Android (Google) Code Review
Browse files

Merge "Explicitly collapse previously-opened alarm on new alarm creation." into ub-deskclock-army

parents 3ff91971 c661a328
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -1070,8 +1070,13 @@ public abstract class AlarmClockFragment extends DeskClockFragment implements
        }

        public void setNewAlarm(long alarmId) {
            if (mExpandedId != alarmId) {
                if (mExpandedItemHolder != null) {
                    collapseAlarm(mExpandedItemHolder, true);
                }
                mExpandedId = alarmId;
            }
        }

        /**
         * Expands the alarm for editing.
@@ -1112,6 +1117,9 @@ public abstract class AlarmClockFragment extends DeskClockFragment implements
            if (!animate) {
                // Set the "end" layout and don't do the animation.
                itemHolder.arrow.setRotation(ROTATE_180_DEGREE);
                itemHolder.summary.setVisibility(View.GONE);
                itemHolder.hairLine.setVisibility(View.GONE);
                itemHolder.delete.setVisibility(View.VISIBLE);
                return;
            }

@@ -1228,6 +1236,9 @@ public abstract class AlarmClockFragment extends DeskClockFragment implements
                // Set the "end" layout and don't do the animation.
                itemHolder.arrow.setRotation(0);
                itemHolder.hairLine.setTranslationY(0);
                itemHolder.hairLine.setVisibility(View.VISIBLE);
                itemHolder.summary.setAlpha(1);
                itemHolder.summary.setVisibility(View.VISIBLE);
                return;
            }