mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Add spring to QSB when opening all apps.
Bug: 64355491 Change-Id: I760856a32779b314c8b01ef2c051985e18b68ecb
This commit is contained in:
@@ -448,9 +448,20 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
|
||||
row = Math.abs(numTotalRows - row);
|
||||
}
|
||||
|
||||
// We manipulate the stiffness, min, and max values based on the items distance to the
|
||||
// first row and the items distance to the center column to create the ^-shaped motion
|
||||
// effect.
|
||||
calculateSpringValues(spring, row, col);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDefaultValues(SpringAnimation spring) {
|
||||
calculateSpringValues(spring, 0, mAppsPerRow / 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* We manipulate the stiffness, min, and max values based on the items distance to the
|
||||
* first row and the items distance to the center column to create the ^-shaped motion
|
||||
* effect.
|
||||
*/
|
||||
private void calculateSpringValues(SpringAnimation spring, int row, int col) {
|
||||
float rowFactor = (1 + row) * 0.5f;
|
||||
float colFactor = getColumnFactor(col, mAppsPerRow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user