Giter VIP home page Giter VIP logo

android-stickerview's Introduction

android-StickerView

Description

StickerView is a android UI library that make you able to use Single hand gesture to rotate, scale and flip the ‘sticker’.

alt tag

Usage

The usage is simple, just like adding a child view. For example, if you have an activity:

FrameLayout canvas = findViewById(R.id.vg_canvas); 

//……

// add a stickerImage to canvas
StickerImageView iv_sticker = new StickerImageView(getContext());
iv_sticker.setImageDrawable(((ImageView)view.findViewById(R.id.iv_sticker)).getDrawable());
canvas.adView(iv_sticker);

// add a stickerText to canvas
StickerTextView tv_sticker = new StickerTextView(getContext());
tv_sticker.setText(“call me baby”);
canvas.addView(tv_sticker);

// add a stickerText to canvas
StickerGifView gifSticker = new StickerGifView(this);
gifSticker.setGifPath(stkrName);
String tag = String.valueOf(<tag> + 1);
gifSticker.setStickerTag(tag);
gifSticker.setOnSelectListener(stickerOperation);
canvas.addView(gifSticker);

//Sticker Listener
private IStickerOperation stickerOperation=new IStickerOperation() {
        @Override
        public void onSelect(@NotNull String tag) {
      
        }

        @Override
        public void onDelete(@NotNull String tag) {
      
        }
    };

Orignal GifView Repository : https://github.com/Cutta/GifView

License

Copyright 2017 Iqbal Ahmed.

Copyright 2017 ken_cheung.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

android-stickerview's People

Contributors

dastaniqbal avatar dicksonchow avatar kencheung4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

android-stickerview's Issues

Cant get the exact location of the textview within it's parent.

Is there anyway of finding the exact x,y coordinates of the stickerTextView.tvmain inside of it's parent? In my case, the parent is a RelativeLayout.

I am trying to use drawText() to draw the text at the same location and with the same rotation as the stickerTextview is within it's parent. However, StickerTextView.Bottom and StickerTextView.Right returns the same value regardless of the position of the StickerTextView.

I also tried StickerTextView.getx and StickerTextView.getY after sticking the parent relativeLayout to the top and left corner of the scree. This only works when the textview reaches a certain size only. Otherwise, if the textview is too small, then it is drawn below where it should be.

Move Sticker outside the screen , it hides

hi,

I am using this library but i have one query regarding to move. when i move the sticker on screen then it will be hide form the screen.

How to resolve it please guide me.

Thankx

Small glitch when rotate near 225°

Hello,

There is a small glitch when you try to rotate the image.
More it is near 225°, the more you see a small "jump" when you click on rotate with the first move.
I don't if you get what I want to explain.

Just try to rotate the image near 225°. Then, click on rotate and you will see an "angle jump" on the FIRST move.

I think it will be hard to correct it...

thanks

Load custom bitmap

When I load a bitmap it resizes it How can I load a resized sticker say like 150px by 180px? I tried changing the layout params from match_parent to different sizes but it didn't work and I also tried scalling the bitmap before loading it in StickerView but StickerView resizes it
Please help...

Scaling Issue

Dynamically adding sticker view in view pager, scaling works only for the first page and other stickers on other pages are movable/draggable but not scalable.Is there any particular reason for that?

Android Studio can not find library for SttickerView

i have implemented implementation 'com.github.kencheung4:android-StickerView:' this dependency but at the time of rebuild the project Android Studio could not find this dependency. can anyone help me to deal with this problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.