Custom textview with rotate, zoom in,zoom out and move on touch in android?
Asked Answered
C

2

9

Any buddy have Custom Text View with Rotate, Zoom In, Zoom Out & Move functionality like MutiTouch Image View like this http://judepereira.com/blog/multi-touch-in-android-translate-scale-and-rotate/ in android? I Want exactly like this screen shots. 1. In that screen draw simple text. 2. In that screen when i zoom this view Text auto wrap. 3. In that screen Move Text on view. 4. In that screen Rotate Text. This all functionality do on TextView touch.

draw simple text

zoom this view Text auto wrapMove Text on viewRotate Text

Curtate answered 3/3, 2015 at 12:27 Comment(8)
Since you are linking to a library/code that does what you need, what seems to be the problem?Jos
@Alex I want exactly like that link which i provide in question but in this link there is ImageView & I want this for TextView.Curtate
Hi @ravi152, are you complete you project?Lesley
No @ biswajitGhosh still i dint solve this issueCurtate
Hey @Curtate , did you receive this issue ?Calvert
@Lesley no i still not find any perfcat solution of thisCurtate
Any luck guy, this is what I want know. If you guys have solution, please share itCicala
@Curtate have you found any solution4Lesleylesli
F
6

I used https://github.com/jcmore2/Collage to achieve a rotated textview

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

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

Now in the Activity you can add to the collageview a complete RelativeLayout with it's children not just images

this also will allow dealing with single view or multiple .. TextView or any thing else .. finally this will make the view not just rotated but dragged and zoomed with multi touch gesture.

enter image description here

enter image description here

Felisafelise answered 27/6, 2016 at 11:22 Comment(1)
hey can you give code for textview i am really stuck in thisSwigart
L
5

Yes you can create it see below image 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 TextView

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

However, build this did an awesome job.

enter image description here

Lesleylesli answered 21/7, 2016 at 10:32 Comment(1)
The link does not open.Radiocommunication

© 2022 - 2024 — McMap. All rights reserved.