Refine search
/** * Gets the score multiplier for each week * * @param week number * @return the multiplier to apply */ private static float getScoreMultiplierForWeek(final int week) { return sInterpolator.getInterpolation(1 - (week / (float) NUM_WEEKS)) * INTERPOLATOR_HEIGHT + INTERPOLATOR_BASE; }
final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); Projection proj = mGoogleMapObject.getProjection(); final long duration = 500; final Interpolator interpolator = new LinearInterpolator(); public void run() { long elapsed = SystemClock.uptimeMillis() - start; float t = interpolator.getInterpolation((float) elapsed / duration); double lng = t * toPosition.longitude + (1 - t)
final Interpolator interpolator = new LinearInterpolator(); public void run() { long elapsed = SystemClock.uptimeMillis() - startTime; float t = interpolator.getInterpolation((float) elapsed / duration);
final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); Projection proj = mMap.getProjection(); public void run() { long elapsed = SystemClock.uptimeMillis() - start; float t = interpolator.getInterpolation((float) elapsed / duration); double lng = t * PERTH.longitude + (1 - t) * startLatLng.longitude; double lat = t * PERTH.latitude + (1 - t) * startLatLng.latitude;
final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); Projection proj = mGoogleMapObject.getProjection(); final long duration = 500; final Interpolator interpolator = new LinearInterpolator(); public void run() { long elapsed = SystemClock.uptimeMillis() - start; float t = interpolator.getInterpolation((float) elapsed / duration); double lng = t * toPosition.longitude + (1 - t)
final Interpolator interpolator = new LinearInterpolator(); public void run() { long elapsed = SystemClock.uptimeMillis() - mStartTime; float t = interpolator.getInterpolation((float) elapsed / duration); marker.setPosition(toPosition);
final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); final long duration = 2500; final Interpolator interpolator = new BounceInterpolator(); handler.post(new Runnable() { @Override public void run() { long elapsed = SystemClock.uptimeMillis() - start; float t = Math.max( 1 - interpolator.getInterpolation((float) elapsed / duration), 0); marker.setAnchor(0.5f, 1.0f + 6 * t); if (t > 0.0) { // Post again 16ms later. handler.postDelayed(this, 16); } } });
private android.view.animation.Interpolator accelerator = new LinearInterpolator(); private static final int DURATION = 70;
final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); Projection proj = mGoogleMapObject.getProjection(); final LatLng startLatLng = proj.fromScreenLocation(startPoint); final long duration = 500; final Interpolator interpolator = new LinearInterpolator(); handler.post(new Runnable() { @Override public void run() { long elapsed = SystemClock.uptimeMillis() - start; float t = interpolator.getInterpolation((float) elapsed / duration); double lng = t * toPosition.longitude + (1 - t)
/** * Gets the score multiplier for each week * * @param week number * @return the multiplier to apply */ private static float getScoreMultiplierForWeek(final int week) { return sInterpolator.getInterpolation(1 - (week / (float) NUM_WEEKS)) * INTERPOLATOR_HEIGHT + INTERPOLATOR_BASE; }
final Interpolator interpolator = new LinearInterpolator(); public void run() { long elapsed = SystemClock.uptimeMillis() - mStartTime; float t = interpolator.getInterpolation((float) elapsed / duration); marker.setPosition(toPosition);
final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); final long duration = 2500; final Interpolator interpolator = new BounceInterpolator(); marker.setVisible(true); handler.post(new Runnable() { @Override public void run() { long elapsed = SystemClock.uptimeMillis() - start; float t = Math.max( 1 - interpolator.getInterpolation((float) elapsed / duration), 0); marker.setAnchor(0.5f, 1.0f + 6 * t); marker.setPosition(latlng) if (t > 0.0) { // Post again 16ms later. handler.postDelayed(this, 16); } } });
private android.view.animation.Interpolator accelerator = new LinearInterpolator(); private static final int DURATION = 70;
final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); final LatLng startLatLng = marker.getPosition(); final long duration = 500; final Interpolator interpolator = new LinearInterpolator(); public void run() { long elapsed = SystemClock.uptimeMillis() - start; float t = interpolator.getInterpolation((float) elapsed / duration);
@Override public float getLeftEdge(float offset) { return leftEdgeInterpolator.getInterpolation(offset); }
final Interpolator interpolator = new LinearInterpolator(); LatList.add(new LatLng(lat, lng)); long elapsed = SystemClock.uptimeMillis() - start; t = interpolator.getInterpolation((float) elapsed / duration);
private void pulseMarker(final Bitmap markerIcon, final Marker marker, final long onePulseDuration) { final Handler handler = new Handler(); final long startTime = System.currentTimeMillis(); final Interpolator interpolator = new CycleInterpolator(1f); handler.post(new Runnable() { @Override public void run() { long elapsed = System.currentTimeMillis() - startTime; float t = interpolator.getInterpolation((float) elapsed / onePulseDuration); marker.setIcon(BitmapDescriptorFactory.fromBitmap(scaleBitmap(markerIcon, 1f + 0.05f * t))); handler.postDelayed(this, 16); } }); }
final long duration = 400; final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); final Interpolator interpolator = new LinearInterpolator(); handler.post(new Runnable() { @Override public void run() { long elapsed = SystemClock.uptimeMillis() - start; float t = interpolator.getInterpolation((float) elapsed / duration); marker.setRotation(marker.getRotation()+2); if (t < 1.0) { // Post again 10ms later. handler.postDelayed(this, 10); } else { // animation ended } } });
@Override public float getRightEdge(float offset) { return rightEdgeInterpolator.getInterpolation(offset); }