am 41615284: Merge "SwipeDismiss: limit fade to 50% alpha while swiping" into klp-modular-dev
* commit '41615284dfb00595ed642c4e31da6a035ff53224': SwipeDismiss: limit fade to 50% alpha while swiping
This commit is contained in:
@@ -3442,14 +3442,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
||||
});
|
||||
swipeDismiss.setOnSwipeProgressChangedListener(
|
||||
new SwipeDismissLayout.OnSwipeProgressChangedListener() {
|
||||
private static final float ALPHA_DECREASE = 0.5f;
|
||||
private boolean mIsTranslucent = false;
|
||||
|
||||
@Override
|
||||
public void onSwipeProgressChanged(
|
||||
SwipeDismissLayout layout, float progress, float translate) {
|
||||
WindowManager.LayoutParams newParams = getAttributes();
|
||||
newParams.x = (int) translate;
|
||||
newParams.alpha = 1 - progress;
|
||||
newParams.alpha = 1 - (progress * ALPHA_DECREASE);
|
||||
setAttributes(newParams);
|
||||
|
||||
int flags = 0;
|
||||
|
||||
Reference in New Issue
Block a user