pinchzoom

How to handle stickers with resize and rotate functionality? [closed]

谁说胖子不能爱 提交于 2019-12-02 14:32:22
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. I have stickers, but how can I put them on original image and move/rotate/enlarge them to adjust on original image? You can check the below link for stickerView https://github.com/nimengbo/StickerView https://github.com/kencheung4/android-StickerView https://github.com/uptechteam/MotionViews-Android https://github.com/wuapnjie/StickerView https://github.com/sangmingming/StickerView https://github.com

Pinch Zoom and Pan

旧巷老猫 提交于 2019-12-02 10:24:42
I have an activity with LinearLayout as its main Layout. In that layout, there is a button that adds a View (R.layout.motor_block) to the main layout (R.id.layout): LayoutInflater inflater = (LayoutInflater)this.getSystemService( Context.LAYOUT_INFLATER_SERVICE ); View iv = inflater.inflate( R.layout.motor_block, null ); RelativeLayout rl = (RelativeLayout) findViewById(R.id.layout); rl.addView(iv); This works fine, but when I add more Views, the screen gets filled up with them so I need a way to "extend" the size by adding pan so I can go through all the views. I also want to add zoom. I

Android pinch-to-zoom layout inside a viewpager with padding left and right

柔情痞子 提交于 2019-12-01 09:24:17
问题 I have a viewpager with left and right padding for showing the previews of left and right pages of viewpager. viewPager.setPadding(30,0,30,0); The content of the viewpager is a zoomlayout borrowed from here. So the issue is, whenever I zoom the layout from the viewpager, the only visible zoom is at top and bottom. Zooming is not visible to the left and right due to padding. Screenshot before zooming Screenshot after zooming The zoomed view is limited inside the viewpager padding. I need the

How to pinch zoom an edittext in android?

烂漫一生 提交于 2019-12-01 09:02:52
问题 Please suggest a way to zoom all the contents of the edittext when a pinch gesture is detected. Want to zoom like typical text editor apps like KingSoft and quickoffice. 回答1: It's going to be nasty, but you can subclass EditText . In your subclass, override onTouch and pass its values to a ScaleGestureDetector . Store the detected scale as a member variable. Override onDraw , and call canvas.scale() with your scale value prior to calling through to super.onDraw . This is likely to wreak havoc

Is it possible to pinch to zoom in cordova

心不动则不痛 提交于 2019-12-01 01:49:27
There is not a lot of information on this, and the little that I have been able to find is very vague and unhelpful. I imply want a page in my cordova/phonegap app to have an image that can be pinched on to zoom in and pan around. Is this possible and if so, How do I do it? In the native code just after this line super.loadUrl(Config.getStartUrl()); Add this WebSettings settings = super.appView.getSettings(); settings.setBuiltInZoomControls(true); settings.setDisplayZoomControls(true); settings.setSupportZoom(true); You'll need this in native part import android.webkit.WebSettings; And in the

Android change recycler view column no. on pinch zoom

你。 提交于 2019-12-01 00:19:12
I have in my layout recycler view for gallery application. I want to incorporate a pinch touch event listner such that the recycler view column no. increases or decreases on pich in and out. I have seen this type of interface in many gallery application. What is the best way to acheive this so that the transition is smooth. Small Video link :- http://sendvid.com/s68fiqpd I tried using below code (as provided by @Yogesh Rathi) but results is not what I want to achieve. import android.content.Context; import android.graphics.Canvas; import android.support.annotation.NonNull; import android

Is it possible to pinch to zoom in cordova

梦想与她 提交于 2019-11-30 21:06:37
问题 There is not a lot of information on this, and the little that I have been able to find is very vague and unhelpful. I imply want a page in my cordova/phonegap app to have an image that can be pinched on to zoom in and pan around. Is this possible and if so, How do I do it? 回答1: In the native code just after this line super.loadUrl(Config.getStartUrl()); Add this WebSettings settings = super.appView.getSettings(); settings.setBuiltInZoomControls(true); settings.setDisplayZoomControls(true);

Zoomable TextView in ScrollView

柔情痞子 提交于 2019-11-30 19:28:59
问题 I would like to make a TextView that can change the size of it's text based on pinch zooming. The TextView is inside a ScrollView . I've got the TextView to zoom when pinching BUT only when you move your fingers almost perfectly horizontally. If there is a vertical component to the pinch-zoom it defaults to scrolling instead of zooming Is there a way to disable the scrolling of the ScrollView when there is more than 1 pointer on it then re-enable scrolling when the pointer count returns to 1

after canvas zoom with pivot point, x- and y- coordinates are wrong

家住魔仙堡 提交于 2019-11-30 17:46:39
问题 I am trying to implement zooming on a canvas which should focus on a pivot point. Zooming works fine, but afterwards the user should be able to select elements on the canvas. The problem is, that my translation values seem to be incorrect, because they have a different offset, than the ones where I don't zoom to the pivot point (zoom without pivot point and dragging works fine). I used some code from this example. The relevant code is: class DragView extends View { private static float MIN

pinch zoom feature inside a scroll view

与世无争的帅哥 提交于 2019-11-30 15:56:54
问题 I have a scroll view. I need to apply pinch zoom feature inside this scroll view. Can any suggest a method? Is there any library to include a container view having pinch zoom feature. 回答1: I think you need a custom ImageView with pinch zoom ability. Check out this answer: https://stackoverflow.com/a/7458910/2511775 . It's one of the best answers I've found on SO. 回答2: At last I got the solution. Let me share that. https://code.google.com/p/android-zoom-view/w/list using this library we can