我試圖結合在圖庫視圖中進行圖像縮放/平移 的功能。問題在於控制哪個觸摸事件由每個觸發。在圖像上的水平拖動中,ImageView需要處理拖動以平移,直到達到圖像的邊緣 ,然後庫視圖需要處理 觸摸事件,以便它可以滑動到下一張照片。 看來,如果我從imageview的ontouchevent, 返回false,那麼我將不會收到panning-drag移動事件的通知。 我試圖做的是從imageview的ontouchevent 返回true,直到圖像的邊緣被擊中,然後返回false。然而我相信這不會導致圖庫開始處理這些事件,因爲它錯過了最初的觸地事件。 我的下一個想法是以某種方式將包含活動轉換爲 觸摸處理程序,並以某種方式使Gallery和ImageView正常獲取 觸摸事件,並讓該活動手動轉發觸摸事件的 。不知道這是可能的還是有一個例子。 我最後的手段是不使用我想避免的android.widget.Gallery, ,因爲我希望小部件在手機上的其他地方「感覺」與 相同,並且我喜歡代碼重用。不幸的是我 可能不得不這樣做,因爲我看到所有其他具有此縮放/平移功能的應用程序似乎都不使用圖庫小部件(Gallery3D等)。 我的問題是,什麼是最好的方式來設計這種情況,其中 motionevents需要拆分兩個視圖?任何想法將是 非常感謝你。Pinch Zoom with gallery
0
A
回答
相關問題
- 1. Pinch-zoom with Hammer.js
- 2. iPhone UIImageView pinch zoom
- 3. android pinch zoom
- 4. View Pager + ImageView + Pinch Zoom + Rotation
- 5. cocso2d pinch-zoom like Fieldrunners
- 6. Android pinch-zoom into image
- 7. JQuery Mobile Pinch Zoom Image Only
- 8. JFreechart Zoom with mouseWheelListener
- 9. Bootstrap Gallery with Lightbox
- 10. Photoswipe with Justified Gallery
- 11. jquery map with mousewheel zoom
- 12. Java android ImageView with zoom
- 13. Jquery modal imagen with zoom
- 14. jquery zoom with dynamic-changing image
- 15. 如何使用Android中的OnGestureListener檢測pinch-zoom事件?
- 16. Thumbnail image gallery with Javascript without plugin
- 17. Fotorama jQuery Gallery with Rails 4.2.0(Turbolinks issue)
- 18. jquery fancybox with gallery thumbnail list in c#asp.net website
- 19. zoom UICollectionView
- 20. GLSurfaceView縮放(PINCH縮放)
- 21. zoom zoom blurred
- 22. Osmdroid和Pinch
- 23. Cytoscape cyPosition()vs zoom zoom
- 24. mbBgndGallery - jquery gallery
- 25. highcharts tooltip not zoom after zoom
- 26. Swift GoogleMaps fitBounds Zoom
- 27. 在添加d3.behavior.zoom時,.on(「zoom」,zoom),zoom undefined
- 28. MandelbrotSet zoom
- 29. MKUserTrackingModeFollowWithHeading,zoom
- 30. JavaScript zoom
它是一個艱鉅的任務在這裏解釋..粘貼在這裏,你的代碼,使任何人都可以幫你看着辦吧.., – Pawan