holder.addCallback(this);
}
- public static final int SLIDESHOW_DURATION = 5000;
+ public static final int SLIDESHOW_DURATION = 2000;
public interface DataSource {
/**
performUpdate(mQueuedFrameRect, sQueuedGrow, delta);
if (alpha >= 1.0f) {
// We switch the image.
- mBitmap.recycle();
mRect = mQueuedRect;
mBitmap = mQueuedBitmap;
mFrameRect = mQueuedFrameRect;
private void performUpdate(RectF rect, Vector3f grow, long delta) {
float timeElapsed = ((float)(delta)) / 1000.0f;
- float amountToGrowX = timeElapsed * (rect.width() / 30.0f);
+ float amountToGrowX = timeElapsed * (rect.width() / 15.0f);
float amountToGrowY = amountToGrowX * (rect.height() / rect.width());
rect.top -= amountToGrowY * grow.x;
rect.left -= amountToGrowX * grow.y;