android – How to handle stickers with resize and rotate functionality?-ThrowExceptions

Exception or error:

I am currently developing an application which will allow user to add stickers (hat, hairs, spectacles etc) on image. User can resize that sticker or can rotate that and move also. See image.

enter image description here

I have stickers, but how can I put them on original image and move/rotate/enlarge them to adjust on original image?

How to solve:

You can check the below link for stickerView



I found a good result at Which handles 3 in 1 facility. On Multi-Touch, you can pan your image, you can scale your image and at the same time you can also rotate your image. And you can add number of stickers as you want.


To enlarge/reduce an image, you can try the following code:

yourImageView.setLayoutParams(new GridView.LayoutParams(newWidthImage, newHeightImage));

Hope this help.


First step : Download this link Lib.

Second : (StickerView,BubblePropertyModel, in this three file paste your project).

Third step : Below Code Past your MainActivity File:

Note: mainlayout is (Relativelayout object)

 final StickerView stickerView21 = new StickerView(this);

            stickerView21.setOperationListener(new  StickerView.OperationListener() {
                public void onDeleteClick() {

                public void onEdit(StickerView stickerView)


                public void onTop(StickerView stickerView) {
                    int position = mViews.indexOf(stickerView);
                    if (position == mViews.size() - 1) {
                    StickerView stickerTemp = (StickerView) mViews.remove(position);

                    mViews.add(mViews.size(), stickerTemp);

            RelativeLayout.LayoutParams l11= new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
            mainLayout.addView(stickerView21, l11);


Check out the blogspot they tried to implement the functionality of stretch the image on arrow click and also delete it, and also you can move the image on the screen using gesture.

Drag-Drop image Also check out the Demo of DragDropImage

You can also download the source code which is mentioned in blog.

Leave a Reply

Your email address will not be published. Required fields are marked *