StickerView icon indicating copy to clipboard operation
StickerView copied to clipboard

hide and show selected sticker not remove it

Open pawaom opened this issue 8 years ago • 3 comments

hide and show selected sticker not remove it

is it possible to hide and show a selected sticker not remove it totally

pawaom avatar Aug 30 '17 06:08 pawaom

You can set realBounds = new Rect(0,0,0,0); to hide the sticker and again when you want to show it set realBounds = new Rect(0, 0, getWidth(), getHeight());

Surabhi3 avatar Sep 05 '17 07:09 Surabhi3

when first time click on sticker it display small icon but when i again click than it must be remove... How ???

v1234567 avatar Nov 07 '17 12:11 v1234567

Create these two function inside StickerView Class:-

public void hideSticker(Sticker sticker){
    if(stickers.contains(sticker)){
        sticker.setAlpha(0);
    }
    invalidate();
  }

  public void showStickers(sticker){
    if(stickers.contains(sticker)){
        sticker.setAlpha(255);
    }
    invalidate();
  }

SumitMarwha avatar Nov 27 '17 08:11 SumitMarwha