Merge "Update window alpha at the same time as translating" into klp-modular-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cb54f978b5
@@ -3449,6 +3449,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
|||||||
SwipeDismissLayout layout, float progress, float translate) {
|
SwipeDismissLayout layout, float progress, float translate) {
|
||||||
WindowManager.LayoutParams newParams = getAttributes();
|
WindowManager.LayoutParams newParams = getAttributes();
|
||||||
newParams.x = (int) translate;
|
newParams.x = (int) translate;
|
||||||
|
newParams.alpha = 1 - progress;
|
||||||
setAttributes(newParams);
|
setAttributes(newParams);
|
||||||
|
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
@@ -3464,6 +3465,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
|||||||
public void onSwipeCancelled(SwipeDismissLayout layout) {
|
public void onSwipeCancelled(SwipeDismissLayout layout) {
|
||||||
WindowManager.LayoutParams newParams = getAttributes();
|
WindowManager.LayoutParams newParams = getAttributes();
|
||||||
newParams.x = 0;
|
newParams.x = 0;
|
||||||
|
newParams.alpha = 1;
|
||||||
setAttributes(newParams);
|
setAttributes(newParams);
|
||||||
setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS);
|
setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user