Custom text view with rotate, zoom, zoom out and move by touch in android?

Any chat partner has a custom text view with the function of rotating, enlarging, decreasing and moving, such as the MutiTouch Image View, similar to this http://judepereira.com/blog/multi-touch-in-android-translate-scale-and-rotate / in android? I want exactly the same as this screenshot. 1. On this screen, draw plain text. 2. On this screen, when I zoom in on this view. 3. On this screen, "Move text" to view. 4. On this screen, "Rotate Text." This functionality works on the TextView touchscreen.

draw simple text

zoom this view Text auto wrapMove Text on viewRotate text

+7
android textview android-textview scale multi-touch translate
source share
2 answers

I used https://github.com/jcmore2/Collage to achieve the expanded text

but I changed the whole code since the plugin works with images CardView extends ImageView i chnaged to MyCardView extends RelativeLayout , and then deletes all the code associated with images and instead of using collage.createCollageResources (listRes);
I created my own function in my CollageView class

public void createCollage(List<MyCardView> list) { for (MyCardView layout : list) { addCard(layout); } } 

Now in Activity you can add to the collageview the full RelativeLayout with it children not only images

it will also allow dealing with a single view or several .. TextView or something else. Finally, this will make the view not just rotated, but dragged and enlarged using multi-touch gestures.

enter image description here

enter image description here

+4
source share

Yes, you can create it, see the image below and follow here.

ImageView: to add ImageView

  // add a stickerImage to canvas StickerImageView iv_sticker = new StickerImageView(MainActivity.this); iv_sticker.setImageDrawable(getResources().getDrawable(R.drawable.c10)); canvas.addView(iv_sticker); 

TextView: to add a TextView

  // add a stickerText to canvas StickerTextView tv_sticker = new StickerTextView(MainActivity.this); tv_sticker.setText("nkDroid"); canvas.addView(tv_sticker); 

However, building it did an amazing job.

enter image description here

+4
source share

All Articles