Search in sources :

Example 1 with FeatherDrawable

use of com.aviary.android.feather.library.graphics.drawable.FeatherDrawable in project mobile-android by photo.

the class StickersPanel method onClearCurrent.

/**
	 * Removes the current active sticker.
	 * 
	 * @param hv
	 *           - the {@link DrawableHighlightView} of the active sticker
	 * @param removed
	 *           - current sticker is removed
	 */
private void onClearCurrent(DrawableHighlightView hv, boolean removed) {
    mLogger.info("onClearCurrent. hv=" + hv + ", removed=" + removed);
    if (mCurrentFilter != null) {
        mCurrentFilter = null;
    }
    if (null != hv) {
        FeatherDrawable content = hv.getContent();
        if (removed) {
            if (content instanceof StickerDrawable) {
                String name = ((StickerDrawable) content).getStickerName();
                String packname = ((StickerDrawable) content).getPackLabel();
                Tracker.recordTag(name + ": Cancelled");
                Tracker.recordTag(packname + ": Cancelled");
            }
        }
    }
    hv.setOnDeleteClickListener(null);
    ((ImageViewDrawableOverlay) mImageView).removeHightlightView(hv);
    ((ImageViewDrawableOverlay) mImageView).invalidate();
}
Also used : ImageViewDrawableOverlay(com.aviary.android.feather.widget.ImageViewDrawableOverlay) FeatherDrawable(com.aviary.android.feather.library.graphics.drawable.FeatherDrawable) StickerDrawable(com.aviary.android.feather.library.graphics.drawable.StickerDrawable)

Aggregations

FeatherDrawable (com.aviary.android.feather.library.graphics.drawable.FeatherDrawable)1 StickerDrawable (com.aviary.android.feather.library.graphics.drawable.StickerDrawable)1 ImageViewDrawableOverlay (com.aviary.android.feather.widget.ImageViewDrawableOverlay)1