Profile cover photo
Profile photo
Federico Ponzi
About
Federico's posts

Hi all,
I'm trying to develop a simple app to let user draw on a canvas. I have a basic working app, but I would like to implement a pinch-to-zoom gesture on the canvas.
I've stubled upon many posts but haven't found anything similar.
1) I know i can use simple gesture listener to intercept a pinch-to-zoom action. But is there a way to differentiate the gesture from the drawing action? Something like "if !isPinchToZoom then handleDrawEvent()"?
2) How can I effectly draw in the zoomed canvas? The drawpath should be aware of the new coordinates
3) How can I zoom on an image drawn on the canvas (image selected by the user, I actually need to scale it down beforse displaying it)?
Thanks for help

Post has attachment

Post has attachment

Post has shared content
:D
It’s your birthday, +Android, and we’re celebrating with this sugary sweet new wallpaper.
PhotoPhotoPhoto
2015-09-23
3 Photos - View album

[ #settings ] Hi all,
I want to create a settings activity for my app, that uses Material Design.
From Android Studio, i select new -> Activity -> Settings activity.
When i try to open this activity, i get a nullpointer exception:
Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
I'm just try to run the boilerplate code. How can i fix this? Why dosen't android studio provide a sample working settings activity?
Thanks
Wait while more posts are being loaded