StickerView icon indicating copy to clipboard operation
StickerView copied to clipboard

Touch outside sticker doesn't hide sticker border and icons.

Open gajerarajnit opened this issue 8 years ago • 8 comments

i want to hide sticker border and action icons when touch outside of sticker in StickerView.

gajerarajnit avatar Oct 18 '17 07:10 gajerarajnit

I also want touch event outside of sticker in stickerview

Pinkal7600 avatar Jan 02 '18 11:01 Pinkal7600

@gajerarajnit I got the solution.

In StickerView.java change below code:

  1. Add void onStickerNotClicked(); into interface OnStickerOperationListener
  2. Write this code if (onStickerOperationListener != null) { onStickerOperationListener.onStickerNotClicked(); } inside onTouchDown methods between if condition, which is writen below.

Like this, if (currentIcon == null && handlingSticker == null) { if (onStickerOperationListener != null) { onStickerOperationListener.onStickerNotClicked(); } return false; }

After this, we can get outside click event in onStickerNotClicked() method.

Enjoy :)

Pinkal7600 avatar Jan 02 '18 13:01 Pinkal7600

but how to hide control items(border and action buttons) of sticker ??

vrsrohit avatar Jan 05 '18 11:01 vrsrohit

write this code in implemented methods

@Override public void onStickerNotClicked() { stickerView.invalidate(); }

This will hide border and buttons

Pinkal7600 avatar Jan 05 '18 12:01 Pinkal7600

thnx

vrsrohit avatar Jan 05 '18 15:01 vrsrohit

hey pinkal but invalidate is not working

vrsrohit avatar Jan 08 '18 05:01 vrsrohit

@vrsrohit invalidate is working for me, check it whether it is another problem.

Pinkal7600 avatar Jan 13 '18 07:01 Pinkal7600

@Pinkal7600 kk wil see

vrsrohit avatar Jan 16 '18 09:01 vrsrohit