I have an image of a map that I have placed inside a WebView to enable zoom and scrolling. This works fine.
I know the latitude/longitude of the top-left and bottom-right corners so I can calculate positions on the map.
The problem is that I want to place a series of clickable points on the map at specific positions. I have got some success with setting the view padding and then using webview.addView(pointView). The problem with this is that the padded area is made clickable as well, sometimes overriding other points. Setting a layout margin does not seem to work at all (clickable view is placed at top-left corner).
Anyone know how to solve this?
Related
So. Iv'e got a straight forward relative layout which I add multiple ImageViews to.
I don't want the images to obscure each other so as they are added they are translated so they don't.
As more ImageViews are added they need to be translated further and further away from the centre of the layout so as not to overlap other images and so they fall off the edge of the user's screen - no problem so far ...
I need to give the user the ability to pan to see the images that are off screen and also zoom in and out (with gestures not buttons) to see all images or focus in on one.
I think the solution to this problem is to modify the layout to allow pinch and pan but all I can find is how to create views that support pinch and pan.
I need each image to be in a separate ImageView.
Forgive me if this is the wrong way to come at this problem but any help would be much appreciated.
This might help explain:
want to scroll about and zoom around this layout (click to see)
I have to create a ruler with 0-500 values on it.In which there would be fix needle on centre and ruler will be moving horizontally.
i have searched a lot and found some link
https://dhingrakimmi.wordpress.com/2015/09/17/android-measurment-scale-my-scale/?preview_id=2
using this i am able to draw scale but it is not scrolling it is just showing scale and centre needle.
please help me if any body have idea of that.
I managed it using ListView and it is perfectly running.
I got the position in Onscrollchange listener
I am experimenting with Views in Android and am trying to create a custom 'widget'. What I want to do is create a portion of a circle with an indicator at 12'o clock. I'd then like to to swipe over the circle and when I do, I'd like to see the indicator move to left or right corresponding to a swipe to the left or the right.
I have looked up a number of sources however I am unsure of how to draw an 'indicator' within the arc. In addtion, what needs to be done to animate the arc ? Can this be achieved without OpenGL ?
I am aware of the circlular progress bar and I believe the problem is quite similar, however I didn't have to add a marker inside the circle.
Here is an image of the screen shot of the View I would like to recreate:
This approach would work,Creating a View with rounded corners and position it to bottom to make it seem like arc
I have Android Map Extension attached under actionBar.
I have couple of markers, lets say 2000.
Than I have ArrayList of selected 3 markers upon some constant condition, nevermind.
I want to zoom and move map to include this selected 3 markers at max possible zoom.
It's an easy task, from this forum I found an easy way to do it :
LatLngBounds bounds = new LatLngBounds.Builder().include(new LatLng(maxLat, maxLon)).include(new LatLng(minLat, minLon)).build();
mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 0));
I have map perfectly zoomed at this 3 markers.
Now is hard part.
When I zoom at this markers I have layout that covers bottom half of map.
I want to archive the same situation but on upper half of map only.
Resizing map is not an option.
I've tried to enlarge my boundaries 2 times vertically but it doesn't help
Thank you for your help in advance
GoogleMap.setPadding is what you need. Simply set bottom to half of the height of your map.
In my android app, I have a linearlayout where I put many linearlayouts with images in it. It will go past the screen border horizontally and vertically.
I want the user to pinch zoom in or out and pan around. I tried putting it in a horizontal scroll and vertical scroll, but it wont let me zoom, and I can only move in 1 direction at 1 time, like it wont let me move diagonally.
I tried this plugin
https://code.google.com/p/android-zoom-view/downloads/list
But it won't let me pan around. It only lets me do it on the stuff thats visible on the screen...
Does anyone know how to make this work?
Thanks
The easiest way I can think of is to put your images in HTML and use webview to display it.Webview automatically handles zooming and panning of content.