Fix too thick gesture trail width
Change-Id: If1b78183b24fa0029bc28e5f56a988372182903emain
parent
2ef0d3bf8d
commit
4da2ed7a78
|
@ -133,7 +133,8 @@ final class GesturePreviewTrail {
|
|||
private static float getWidth(final int elapsedTime, final Params params) {
|
||||
final int deltaTime = params.mTrailLingerDuration - elapsedTime;
|
||||
final float deltaWidth = params.mTrailStartWidth - params.mTrailEndWidth;
|
||||
return (deltaTime * deltaWidth) / params.mTrailLingerDuration + params.mTrailEndWidth;
|
||||
return Math.max(
|
||||
(deltaTime * deltaWidth) / params.mTrailLingerDuration, params.mTrailEndWidth);
|
||||
}
|
||||
|
||||
private final RoundedLine mRoundedLine = new RoundedLine();
|
||||
|
|
Loading…
Reference in New Issue