Skip to content

Commit ce6eb1f

Browse files
author
Jim Miller
committed
Fix 5355659: Change chevron visuals, timing, and animated positioning
Change-Id: I55e34496cc1eb4ace60b6d1ccbdb894035bca6e2
1 parent 90fb9aa commit ce6eb1f

13 files changed

Lines changed: 6 additions & 2 deletions

core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public interface OnTriggerListener {
7171

7272
// Tune-able parameters
7373
private static final int CHEVRON_INCREMENTAL_DELAY = 160;
74-
private static final int CHEVRON_ANIMATION_DURATION = 650;
74+
private static final int CHEVRON_ANIMATION_DURATION = 850;
7575
private static final int RETURN_TO_HOME_DELAY = 1200;
7676
private static final int RETURN_TO_HOME_DURATION = 300;
7777
private static final int HIDE_ANIMATION_DELAY = 200;
@@ -297,7 +297,7 @@ private void switchToState(int state, float x, float y) {
297297
*/
298298
private void startChevronAnimation() {
299299
final float r = mHandleDrawable.getWidth() * 0.4f;
300-
final float chevronAnimationDistance = mOuterRadius * 0.8f;
300+
final float chevronAnimationDistance = mOuterRadius * 1.0f;
301301
final float from[][] = {
302302
{mWaveCenterX - r, mWaveCenterY}, // left
303303
{mWaveCenterX + r, mWaveCenterY}, // right
@@ -310,6 +310,8 @@ private void startChevronAnimation() {
310310
{mWaveCenterX, mWaveCenterY + chevronAnimationDistance} }; // bottom
311311

312312
mChevronAnimations.clear();
313+
final float startScale = 0.5f;
314+
final float endScale = 2.0f;
313315
for (int direction = 0; direction < 4; direction++) {
314316
for (int count = 0; count < mFeedbackCount; count++) {
315317
int delay = count * CHEVRON_INCREMENTAL_DELAY;
@@ -323,6 +325,8 @@ private void startChevronAnimation() {
323325
"x", new float[] { from[direction][0], to[direction][0] },
324326
"y", new float[] { from[direction][1], to[direction][1] },
325327
"alpha", new float[] {1.0f, 0.0f},
328+
"scaleX", new float[] {startScale, endScale},
329+
"scaleY", new float[] {startScale, endScale},
326330
"onUpdate", mUpdateListener));
327331
}
328332
}
421 Bytes
Loading
518 Bytes
Loading
510 Bytes
Loading
399 Bytes
Loading
202 Bytes
Loading
221 Bytes
Loading
218 Bytes
Loading
212 Bytes
Loading
504 Bytes
Loading

0 commit comments

Comments
 (0)