mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Updating fade-effect parameters:
> Shifting the effect at the edge in the presence of padding > Removing fade effect at the bottom > Fixing wrong call for translating children Bug: 63003761 Change-Id: Ia9d030de60e933a2e688496109d62977885c2c0d
This commit is contained in:
@@ -202,8 +202,6 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas c) {
|
||||
c.translate(0, mContentTranslationY);
|
||||
|
||||
// Draw the background
|
||||
if (mEmptySearchBackground != null && mEmptySearchBackground.getAlpha() > 0) {
|
||||
mEmptySearchBackground.draw(c);
|
||||
@@ -212,6 +210,13 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
|
||||
super.onDraw(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatchDraw(Canvas canvas) {
|
||||
canvas.translate(0, mContentTranslationY);
|
||||
super.dispatchDraw(canvas);
|
||||
canvas.translate(0, -mContentTranslationY);
|
||||
}
|
||||
|
||||
public float getContentTranslationY() {
|
||||
return mContentTranslationY;
|
||||
}
|
||||
@@ -336,6 +341,22 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
|
||||
mFastScrollHelper.onSetAdapter((AllAppsGridAdapter) adapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getBottomFadingEdgeStrength() {
|
||||
// No bottom fading edge.
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isPaddingOffsetRequired() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getTopPaddingOffset() {
|
||||
return -getPaddingTop();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the bounds for the scrollbar.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user