Create KenBurns with minimum possible zoom - android

I am using this library
I am trying to create app with minimal possible zoom.
In my application I have small area where the images are presented as slide show. But the images are big so when kenburns effect starts it it zoomed too much.
How can I set the zoom level ?

You need to create your own TransitionGenerator. If you want the keep the random movement and control the zoom, a good place to start is to base your custom TransitionGenerator off this one. The highlighted line (120) uses a random zoom factor. Hardcoding it will do what you need.

Related

How to show a map which is a big image?

I got a png image which is 5000x5000. This image is some sort of map. I wanted to display the image in an imageview and this gave me an outOfMemoryException(of course). So i tried to set a sampleSize, but this decreased the resolution which makes the map not very usefull.
So basically I want to show this image and be able to zoom and scroll without resolution loses. What would be the best approach?
I am a fan of Dave Morrissey's SubsamplingScaleImageView, which seems to cover what you want. Quoting the project documentation, it is:
A custom image view for Android, designed for photo galleries and displaying huge images (e.g. maps and building plans) without OutOfMemoryErrors. Includes pinch to zoom, panning, rotation and animation support, and allows easy extension so you can add your own overlays and touch event detection.

create map shopping center (for example) on android

I Never faced with the task to create a map of the shopping center (for example)
I did a project using a single image as a map, image was maximum size, but the image quality is not enough. I understand i need many small images. if user scrolling or zoom or fling map i programmatically change images...
but,I do not know where to begin, please help me your solutions

Merging overlays to display on MKMapView (iOS) or MapView (android)

I'm working on creating a mobile app which overlays images on top of a google map.
I have a large number of image overlays ('GroundOverlay' objects in KML-speak). I'm running into several issues (mainly performance) when the map is scrolled or zoomed
Having tried several options, I think my next approach will be to combine all the image overlays into one image beforehand, and then simply display that image as a single overlay on the map. Problem is, I'm not sure where to start.
Does anyone have any experience in combining overlay images?
I think there are two problems that need to be solved
1) Calculate the larger 'bounding box' that will contain the final image. I have the bounding box for each overlay ('LatLngBox' in KML-speak), and I think the final box can be calculated by simply examining the values of each LatLngBox and generating the final box based on the min/max values. Anyone have any insight as to whether this will work?
2) Merge all the overlay images into a single final image. I have no idea where to start here such here. Generating the actual image isn't the problem, but rather where to place each overlay (ie pixel level) so that the resulting image is accurate.
Any tips/hints would be greatly appreciated.
Thanks
the static overlay images can be combined and drawn. but the moving(regularly updated) overlay images would be an issue if you still want to combine them and post as one. the best option i believe would be to combine the static overlay resources and keep them in one set and other moving images drawn separately.
Managed to figure this out on my own.
Answer to (1): The technique I outlined in my question works perfectly
Answer to (2): You can convert between lat/lng and x/y pixels of an image as described here: Convert Lat/Longs to X/Y Co-ordinates

Zooming to a specific Point on SurfaceView

I've got the following problem:
I display a point on a SurfaceView (e.g. one specific pixel like (x=100,y=100)
on the screen.
Now I want to zoom to this specific point with different zoomlevels.
The zoomlevels are calculated by different scaleFactors. But I don't know
how I can display and scale the specific part of the screen?
Perhaps it would be also possible to move to the known displayed parts by "Scrolling about the screen" (using an OnTouchListener).
Have you tried to Canvas.scale() to the specific point in the drawing loop of the SurfaceView?
http://developer.android.com/reference/android/graphics/Canvas.html#scale%28float,%20float,%20float,%20float%29

Android - selecting tile in gameboard by touch?

i am developing checkers application for Android. I have drawn on Canvas gameboard and tiles for each side, also I have made selection of tiles by D-Pad. But what about, Android phone doesn't have D-Pad? There must be a way how to do that in touch (I touch a tile - it is selected now). Do you have any ideas?
Thanks
image of my Gameboard can be found here - http://img171.imageshack.us/img171/7814/checkers.gif
Another (easier?) alternative is to use Android's standard Button/ImageButton. You can customize its border and content, if you don't want the default border to show up.
The standard Buttons works with both touch and D-pad; so you can cut the amount of coding you need to make tiles that behave properly under both situations.
Store tile locations in a 2d Array. On the finger down event, check the event location against each tile. When you find the tile that was poked, select it.

Categories

Resources