update
This commit is contained in:
parent
fd8df84e32
commit
85d5377340
2 changed files with 25 additions and 6 deletions
|
@ -423,7 +423,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
|
|||
|
||||
private LayerDrawable createBackgroundDrawable(@NonNull Context ctx, @DrawableRes int shadowDrawableResId) {
|
||||
Drawable shadowDrawable = ContextCompat.getDrawable(ctx, shadowDrawableResId);
|
||||
Drawable[] layers = new Drawable[] {shadowDrawable, getColoredBg(ctx)};
|
||||
Drawable[] layers = new Drawable[]{shadowDrawable, getColoredBg(ctx)};
|
||||
return new LayerDrawable(layers);
|
||||
}
|
||||
|
||||
|
@ -434,6 +434,21 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
|
|||
return !app.getSettings().isLightContent();
|
||||
}
|
||||
|
||||
private void testShadowOn() {
|
||||
buttonsShadow.setVisibility(View.VISIBLE);
|
||||
buttonsShadow.animate()
|
||||
.alpha(0.8f)
|
||||
.setDuration(200)
|
||||
.setListener(null);
|
||||
}
|
||||
|
||||
private void testShadowOff() {
|
||||
buttonsShadow.animate()
|
||||
.alpha(0f)
|
||||
.setDuration(200);
|
||||
|
||||
}
|
||||
|
||||
private void setupScrollShadow(View view) {
|
||||
final View scrollView;
|
||||
if (useScrollableItemsContainer()) {
|
||||
|
@ -446,7 +461,11 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
|
|||
@Override
|
||||
public void onScrollChanged() {
|
||||
boolean scrollToBottomAvailable = scrollView.canScrollVertically(1);
|
||||
AndroidUiHelper.updateVisibility(buttonsShadow, scrollToBottomAvailable);
|
||||
if (scrollToBottomAvailable) {
|
||||
testShadowOn();
|
||||
} else {
|
||||
testShadowOff();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -182,11 +182,11 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
|
|||
}
|
||||
|
||||
private void testShadowOn() {
|
||||
// buttonsShadow.setAlpha(0f);
|
||||
// buttonsShadow.setAlpha(0.3f);
|
||||
buttonsShadow.setVisibility(View.VISIBLE);
|
||||
buttonsShadow.animate()
|
||||
.alpha(1f)
|
||||
.setDuration(100)
|
||||
.alpha(0.8f)
|
||||
.setDuration(200)
|
||||
.setListener(null);
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
|
|||
// buttonsShadow.setAlpha(0.5f);
|
||||
buttonsShadow.animate()
|
||||
.alpha(0f)
|
||||
.setDuration(100);
|
||||
.setDuration(200);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue