Code example for LinkedList

Methods: offer, remove

0
 
    public void moveToBackOfQueue(View photo) {
        // make this photo the last to be removed. 
        bringChildToFront(photo);
        invalidate();
        mOnTable.remove(photo);
        mOnTable.offer(photo);
    } 
 
    private void throwOnTable(final View photo) {
        mOnTable.offer(photo);
        log("start offscreen"); 
        int width = ((Integer) photo.getTag(R.id.photo_width));
        int height = ((Integer) photo.getTag(R.id.photo_height));
        photo.setRotation(mThrowRotation);
        photo.setX(-mLongSide);
        photo.setY(-mLongSide);
 
        dropOnTable(photo, mThrowInterpolator);
    }