Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

helloJp/Sticker

Repository files navigation

#Sticker Sticker art

1.change StickerView's two fields to decide MAX or MIN scale size

public static final float MAX_SCALE_SIZE = 3.2f;
public static final float MIN_SCALE_SIZE = 0.6f;

2.override dispatchTouchEvent if have to add more than one sticker

 @Override
 public boolean dispatchTouchEvent(MotionEvent ev) {
 if (ev.getAction() == MotionEvent.ACTION_DOWN) {
 int x = (int) ev.getX();
 //calculate action point Y apart from Container layout origin
 int y = (int) ev.getY() - mStatusBarHeight - mToolBarHeight;
 for (StickerView stickerView : mStickers) {
 // dispatch focus to the sticker based on Coordinate
 boolean isContains = stickerView.getContentRect().contains(x, y);
 if (isContains) {
 resetStickersFocus();
 stickerView.setFocusable(true);
 }
 }
 }
 return super.dispatchTouchEvent(ev);
 }

About

add multiple stickers on a picture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /