Skip to content

Commit

Permalink
Merge pull request #1 from wuapnjie/master
Browse files Browse the repository at this point in the history
updated to the latest stickerview version
  • Loading branch information
Gords committed Nov 12, 2023
2 parents fef44ee + 4a82f82 commit 3b6860b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ StickerView

A view which can add sticker and zoom,drag,flip,delete it

**I hope you can copy the source code to your project so you can design your own function.**

## Screenshots
![](https://github.com/wuapnjie/StickerView/blob/master/screenshots/screenshot1.png)
![](https://github.com/wuapnjie/StickerView/blob/master/screenshots/screenshot2.png)

## Usage

In your **build.gradle**
**Suggestion**

**copy the source code to your project so you can design your own function.**

```gradle
compile 'com.flying.xiaopo:sticker:1.6.0'
```

**Tips**:StickerView extends FrameLayout
#### In layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ public void onStickerDragFinished(@NonNull Sticker sticker) {
Log.d(TAG, "onStickerDragFinished");
}

@Override
public void onStickerTouchedDown(@NonNull Sticker sticker) {
Log.d(TAG, "onStickerTouchedDown");
}

@Override
public void onStickerZoomFinished(@NonNull Sticker sticker) {
Log.d(TAG, "onStickerZoomFinished");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ protected boolean onTouchDown(@NonNull MotionEvent event) {
stickers.remove(handlingSticker);
stickers.add(handlingSticker);
}
if (onStickerOperationListener != null){
onStickerOperationListener.onStickerTouchedDown(handlingSticker);
}
}

if (currentIcon == null && handlingSticker == null) {
Expand Down Expand Up @@ -864,6 +867,8 @@ public interface OnStickerOperationListener {

void onStickerDragFinished(@NonNull Sticker sticker);

void onStickerTouchedDown(@NonNull Sticker sticker);

void onStickerZoomFinished(@NonNull Sticker sticker);

void onStickerFlipped(@NonNull Sticker sticker);
Expand Down

0 comments on commit 3b6860b

Please sign in to comment.