Loading packages/SystemUI/res/drawable/ic_clear_all.xml→packages/SystemUI/res/drawable/ic_dismiss_all.xml +12 −7 Original line number Diff line number Diff line Loading @@ -14,12 +14,17 @@ ~ limitations under the License --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="32dp" android:height="32dp" android:width="24dp" android:height="24dp" android:viewportWidth="48.0" android:viewportHeight="48.0"> <path android:fillColor="#FFFFFFFF" android:pathData="M10.0,26.0l28.0,0.0l0.0,-4.0L10.0,22.0L10.0,26.0zM6.0,34.0l28.0,0.0l0.0,-4.0L6.0,30.0L6.0,34.0zM14.0,14.0l0.0,4.0l28.0,0.0l0.0,-4.0L14.0,14.0z"/> android:fillColor="#ffffff" android:pathData="M8.0,19.994l32.0,0.0l0.0,8.0l-32.0,0.0z"/> <path android:fillColor="#ffffff" android:pathData="M0.0,32.0l32.0,0.0l0.0,7.979l-32.0,0.0z"/> <path android:fillColor="#ffffff" android:pathData="M16.0,8.0l32.0,0.0l0.0,8.0l-32.0,0.0z"/> </vector> packages/SystemUI/res/layout/status_bar_notification_dismiss_all.xml +5 −14 Original line number Diff line number Diff line Loading @@ -21,20 +21,11 @@ android:layout_height="wrap_content" android:visibility="gone" > <Button <ImageButton android:id="@+id/dismiss_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="0dp" android:textColor="#ffffffff" android:text="@string/clear_all_notifications_text" android:textSize="18sp" android:textAllCaps="true" android:paddingTop="@dimen/clear_all_padding_top" android:paddingEnd="8dp" android:layout_gravity="end|center_vertical" android:drawableEnd="@drawable/ic_clear_all" android:drawablePadding="4dp" android:fontFamily="sans-serif-light" android:layout_width="48dp" android:layout_height="48dp" android:layout_gravity="end" android:src="@drawable/ic_dismiss_all" android:background="@drawable/ripple_drawable" /> </com.android.systemui.statusbar.DismissView> packages/SystemUI/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -381,7 +381,7 @@ <dimen name="battery_level_padding_end">4dp</dimen> <!-- The top padding of the clear all button --> <dimen name="clear_all_padding_top">4dp</dimen> <dimen name="clear_all_padding_top">12dp</dimen> <!-- Largest size an avatar might need to be drawn in the user picker, status bar, or quick settings header --> Loading packages/SystemUI/src/com/android/systemui/statusbar/DismissView.java +10 −15 Original line number Diff line number Diff line Loading @@ -19,23 +19,18 @@ package com.android.systemui.statusbar; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; import android.view.animation.PathInterpolator; import android.widget.Button; import android.widget.TextView; import com.android.systemui.R; import com.android.systemui.statusbar.phone.PhoneStatusBar; public class DismissView extends ExpandableView { private Button mClearAllText; private View mClearAllIcon; private boolean mIsVisible; private boolean mAnimating; private boolean mWillBeGone; private final Interpolator mAppearInterpolator = new PathInterpolator(0f, 0.2f, 1f, 1f); private final Interpolator mDisappearInterpolator = new PathInterpolator(0f, 0f, 0.8f, 1f); public DismissView(Context context, AttributeSet attrs) { super(context, attrs); } Loading @@ -43,7 +38,7 @@ public class DismissView extends ExpandableView { @Override protected void onFinishInflate() { super.onFinishInflate(); mClearAllText = (Button) findViewById(R.id.dismiss_text); mClearAllIcon = findViewById(R.id.dismiss_text); setInvisible(); } Loading Loading @@ -83,12 +78,12 @@ public class DismissView extends ExpandableView { float endValue = nowVisible ? 1.0f : 0.0f; Interpolator interpolator; if (nowVisible) { interpolator = mAppearInterpolator; interpolator = PhoneStatusBar.ALPHA_IN; } else { interpolator = mDisappearInterpolator; interpolator = PhoneStatusBar.ALPHA_OUT; } mAnimating = true; mClearAllText.animate() mClearAllIcon.animate() .alpha(endValue) .setInterpolator(interpolator) .setDuration(260) Loading @@ -111,7 +106,7 @@ public class DismissView extends ExpandableView { } public void setInvisible() { mClearAllText.setAlpha(0.0f); mClearAllIcon.setAlpha(0.0f); mIsVisible = false; } Loading @@ -134,7 +129,7 @@ public class DismissView extends ExpandableView { } public void setOnButtonClickListener(OnClickListener onClickListener) { mClearAllText.setOnClickListener(onClickListener); mClearAllIcon.setOnClickListener(onClickListener); } @Override Loading @@ -143,7 +138,7 @@ public class DismissView extends ExpandableView { } public void cancelAnimation() { mClearAllText.animate().cancel(); mClearAllIcon.animate().cancel(); } public boolean willBeGone() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +5 −25 Original line number Diff line number Diff line Loading @@ -501,33 +501,13 @@ public abstract class PanelView extends FrameLayout { @Override public void onAnimationEnd(Animator animation) { if (clearAllExpandHack && !mCancelled) { mHeightAnimator = createHeightAnimator(getMaxPanelHeight()); mHeightAnimator.setInterpolator(mLinearOutSlowInInterpolator); mHeightAnimator.setDuration(350); mHeightAnimator.addListener(new AnimatorListenerAdapter() { private boolean mCancelled; @Override public void onAnimationCancel(Animator animation) { mCancelled = true; } @Override public void onAnimationEnd(Animator animation) { mHeightAnimator = null; if (!mCancelled) { notifyExpandingFinished(); setExpandedHeightInternal(getMaxPanelHeight()); } } }); mHeightAnimator.start(); } else { mHeightAnimator = null; if (!mCancelled) { notifyExpandingFinished(); } } } }); mHeightAnimator = animator; animator.start(); Loading Loading
packages/SystemUI/res/drawable/ic_clear_all.xml→packages/SystemUI/res/drawable/ic_dismiss_all.xml +12 −7 Original line number Diff line number Diff line Loading @@ -14,12 +14,17 @@ ~ limitations under the License --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="32dp" android:height="32dp" android:width="24dp" android:height="24dp" android:viewportWidth="48.0" android:viewportHeight="48.0"> <path android:fillColor="#FFFFFFFF" android:pathData="M10.0,26.0l28.0,0.0l0.0,-4.0L10.0,22.0L10.0,26.0zM6.0,34.0l28.0,0.0l0.0,-4.0L6.0,30.0L6.0,34.0zM14.0,14.0l0.0,4.0l28.0,0.0l0.0,-4.0L14.0,14.0z"/> android:fillColor="#ffffff" android:pathData="M8.0,19.994l32.0,0.0l0.0,8.0l-32.0,0.0z"/> <path android:fillColor="#ffffff" android:pathData="M0.0,32.0l32.0,0.0l0.0,7.979l-32.0,0.0z"/> <path android:fillColor="#ffffff" android:pathData="M16.0,8.0l32.0,0.0l0.0,8.0l-32.0,0.0z"/> </vector>
packages/SystemUI/res/layout/status_bar_notification_dismiss_all.xml +5 −14 Original line number Diff line number Diff line Loading @@ -21,20 +21,11 @@ android:layout_height="wrap_content" android:visibility="gone" > <Button <ImageButton android:id="@+id/dismiss_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="0dp" android:textColor="#ffffffff" android:text="@string/clear_all_notifications_text" android:textSize="18sp" android:textAllCaps="true" android:paddingTop="@dimen/clear_all_padding_top" android:paddingEnd="8dp" android:layout_gravity="end|center_vertical" android:drawableEnd="@drawable/ic_clear_all" android:drawablePadding="4dp" android:fontFamily="sans-serif-light" android:layout_width="48dp" android:layout_height="48dp" android:layout_gravity="end" android:src="@drawable/ic_dismiss_all" android:background="@drawable/ripple_drawable" /> </com.android.systemui.statusbar.DismissView>
packages/SystemUI/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -381,7 +381,7 @@ <dimen name="battery_level_padding_end">4dp</dimen> <!-- The top padding of the clear all button --> <dimen name="clear_all_padding_top">4dp</dimen> <dimen name="clear_all_padding_top">12dp</dimen> <!-- Largest size an avatar might need to be drawn in the user picker, status bar, or quick settings header --> Loading
packages/SystemUI/src/com/android/systemui/statusbar/DismissView.java +10 −15 Original line number Diff line number Diff line Loading @@ -19,23 +19,18 @@ package com.android.systemui.statusbar; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; import android.view.animation.PathInterpolator; import android.widget.Button; import android.widget.TextView; import com.android.systemui.R; import com.android.systemui.statusbar.phone.PhoneStatusBar; public class DismissView extends ExpandableView { private Button mClearAllText; private View mClearAllIcon; private boolean mIsVisible; private boolean mAnimating; private boolean mWillBeGone; private final Interpolator mAppearInterpolator = new PathInterpolator(0f, 0.2f, 1f, 1f); private final Interpolator mDisappearInterpolator = new PathInterpolator(0f, 0f, 0.8f, 1f); public DismissView(Context context, AttributeSet attrs) { super(context, attrs); } Loading @@ -43,7 +38,7 @@ public class DismissView extends ExpandableView { @Override protected void onFinishInflate() { super.onFinishInflate(); mClearAllText = (Button) findViewById(R.id.dismiss_text); mClearAllIcon = findViewById(R.id.dismiss_text); setInvisible(); } Loading Loading @@ -83,12 +78,12 @@ public class DismissView extends ExpandableView { float endValue = nowVisible ? 1.0f : 0.0f; Interpolator interpolator; if (nowVisible) { interpolator = mAppearInterpolator; interpolator = PhoneStatusBar.ALPHA_IN; } else { interpolator = mDisappearInterpolator; interpolator = PhoneStatusBar.ALPHA_OUT; } mAnimating = true; mClearAllText.animate() mClearAllIcon.animate() .alpha(endValue) .setInterpolator(interpolator) .setDuration(260) Loading @@ -111,7 +106,7 @@ public class DismissView extends ExpandableView { } public void setInvisible() { mClearAllText.setAlpha(0.0f); mClearAllIcon.setAlpha(0.0f); mIsVisible = false; } Loading @@ -134,7 +129,7 @@ public class DismissView extends ExpandableView { } public void setOnButtonClickListener(OnClickListener onClickListener) { mClearAllText.setOnClickListener(onClickListener); mClearAllIcon.setOnClickListener(onClickListener); } @Override Loading @@ -143,7 +138,7 @@ public class DismissView extends ExpandableView { } public void cancelAnimation() { mClearAllText.animate().cancel(); mClearAllIcon.animate().cancel(); } public boolean willBeGone() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +5 −25 Original line number Diff line number Diff line Loading @@ -501,33 +501,13 @@ public abstract class PanelView extends FrameLayout { @Override public void onAnimationEnd(Animator animation) { if (clearAllExpandHack && !mCancelled) { mHeightAnimator = createHeightAnimator(getMaxPanelHeight()); mHeightAnimator.setInterpolator(mLinearOutSlowInInterpolator); mHeightAnimator.setDuration(350); mHeightAnimator.addListener(new AnimatorListenerAdapter() { private boolean mCancelled; @Override public void onAnimationCancel(Animator animation) { mCancelled = true; } @Override public void onAnimationEnd(Animator animation) { mHeightAnimator = null; if (!mCancelled) { notifyExpandingFinished(); setExpandedHeightInternal(getMaxPanelHeight()); } } }); mHeightAnimator.start(); } else { mHeightAnimator = null; if (!mCancelled) { notifyExpandingFinished(); } } } }); mHeightAnimator = animator; animator.start(); Loading