pinch

Pinch Zoom in Android

风格不统一 提交于 2019-12-21 06:01:55
问题 I have a layout, which include some TextViews and ImageViews. Haven't they created an easy way to include pinch zoom on an simple ScrollView/LinearLayout? I have watched some codes, but they work only on ImageViews. Recently I found setDisplayZoomControls(boolean). Is it possible to make this work on a layout with TextViews? If no, maybe somebody provides a code, which will zoom in/out my layout with pinch zoom. Thanks. 回答1: Try using android-pinch, it is supposed to work on web-views as well

detecting pinch to zoom on iOS

ⅰ亾dé卋堺 提交于 2019-12-20 19:31:08
问题 I am trying to detect a pinch to zoom event on iOS (and Android really) because I am using jQuery Mobile to show pages with a fixed header. In a dream world what I'd like is for the header not to zoom but for the rest of the page to do so. But I know this is not possible. On most pages I have a mobile version that resizes itself nicely making zooming un-necessary, but on the 'front cover' the client wants the user to be able to see the whole page (shrunk to fit) with the fixed header large

scaling image on pinch gesture

我的梦境 提交于 2019-12-19 19:40:20
问题 I'm using the jQuery touchy plugin for detecting the pinch event to give users the ability to zoom in/out on an image. Here's the gist of my code: var w = 800, h = 600; $('img').on('touchy-pinch', function (e, $target, data) { $(this).css({ width: w * data.scale, height: h * data.scale }); }); Where the custom data object contains the following: scale previousScale currentPoint startPoint startDistance It works fine on the first pinch, but once my fingers leave the screen and then I try to do

Pinch Zoom in android for an imageview?

半世苍凉 提交于 2019-12-18 17:12:42
问题 I have one requirement in which i have to zoom in and zoom out images on pinch.. Please if anyone can suggest me pinch zoom functionality for Imageview.???? 回答1: try this import android.content.Context; import android.graphics.Canvas; import android.graphics.drawable.BitmapDrawable; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.ScaleGestureDetector; import android.view.View; public class MyImageView extends View { private

How to implement pinch-zoom feature for camera preview [closed]

懵懂的女人 提交于 2019-12-18 03:39:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . i tried pinch-zoom feature for image from this.it works fine but how can i implement pinch-zoom feature for camera preview. Please help me. Thanks in advance. 回答1: This is what I used to add pinch to zoom. The link to the code is here: https://github.com/maxtower

PhoneGap pinchzoom

你说的曾经没有我的故事 提交于 2019-12-13 12:13:32
问题 I apologize for the newbie question : How do you implement the pinchzoom gesture in phonegap apps? I am just starting with PhoneGap and a little education wont hurt hehe ! Thnx! 回答1: My experience is that you don't implement it so much as you use it. Phonegap is essentially a webview (think mobile safari). So it does allow for automatic zooming gestures, but to implement it, you do so just as you would with any website (basically create web content that requires it, or utilize webkit calls

Pinch to Zoom on ListBox on windows phone 7

谁都会走 提交于 2019-12-11 18:48:51
问题 I am trying to add pinch to zoom feature to a data bound ListBox. What is the most efficient way to do this? I have placed the ListBox inside a Grid control and made it scrollable. This is my current code. <Grid x:Name="ContentPanel" Grid.Row="1" Margin="10,0,10,10" Background="Black" > <ListBox Name="lstText" FontSize="24" Foreground="White" SelectionMode="Single" Margin="10,0,10,10" ScrollViewer.VerticalScrollBarVisibility="Visible" > <ListBox.ItemTemplate> <DataTemplate> <StackPanel >

android pinch zoom and panning for canvas, something doesn't work

一个人想着一个人 提交于 2019-12-11 02:58:23
问题 i'm trying to implement pinch zoom and panning options for canvas i'm using the code (slightly modified, i've added DisplayMetrics to automatically set devices screen size) from this webpage http://vivin.net/2011/12/04/implementing-pinch-zoom-and-pandrag-in-an-android-view-on-the-canvas/8/ As a result i have just an image opening in app(not whole though, just a fragment cause its bigger than screen size), image is not zooming and not panning, its just rotating when i rotate the phone. I used

Using Google Maps Javascript API pinch-to-zoom on my own image

…衆ロ難τιáo~ 提交于 2019-12-10 20:57:19
问题 I'm trying to create a mobile-friendly web page that will allow a user to drag an <img> around in a <div> . I've got this working using the image.ontouchstart method. Now I want to make it so the user can pinch-to-zoom when viewing this from an iOS device (I'm currently browsing to my page locally from my iPad). From the research I've done so far, it seems like the way to go is to use the Google Maps Javascript API. My question is: It is possible to use the Google Maps Javascript API to

Pinch event on iFrame Extjs 5

寵の児 提交于 2019-12-10 11:55:31
问题 I want to detect pinch event on an IFrame (Extjs 5 Component). What's wrong with this code?? Ext.create('Ext.ux.IFrame', { autoScroll: true, src: 'resources/docs/doc1.html', cls: 'iframeStyle', listeners: { pinch: function (event) { alert('event.scale= ' + event.scale); } } }) 回答1: Out of the box, Ext.ux.Iframe does not have "pinch" as an event. Only the events listed on the API can be added using the "listeners" syntax. http://docs.sencha.com/extjs/5.0/5.0.1-apidocs/#!/api/Ext.ux.IFrame You