I need to add some stylish button on Google map in my application just the placed in image.
Kindly help me to add.Thanks in Advance.
Here is the demo that i want to create
You need to create a view that decorates/wraps your Google Map View. You can then configure this view how you would like with buttons, overlays, etc and use click listeners to delegate to the map events you would like performed.
Related
I am building an E-Commerce App and I have an activity showing image slider, description and related items, and in image slider I have put an arrow to change the product on the arrow click I want to be in the same activity but data should be different.How should I do that need your help guys.
You should try doing it by urself in one of the many ways its possible to. Then we could provide some help with your idea or show you better solution. I think you are looking for RecyclerView (https://developer.android.com/guide/topics/ui/layout/recyclerview). It lets you show some similar views but with different data inside. Also as an item inside RecyclerView you can try CardView.
Using only RecyclerView you can also use:
https://stackoverflow.com/a/46084182/8713068
You can also search for a library that has everything you want inside already implemented. For example the first library that came out after i typed it in google : https://github.com/Ramotion/cardslider-android.
My question is regarding the java way of achieving this: Google Maps infoWindow without marker?
Is it possible to launch a custom info window in v2 without using a marker? Which event should I use to detect a long press on the map and how can I launch an InfoWindow?
Here is what I want to achieve.
I need to be able to get the location from the place, so I can add the marker to that position, whenever an icon from the custom view is selected.
Is it possible to launch a custom info window in v2 without using a
marker?
It isn't, but you can create a transparent marker and show the InfoWindow on it.
To make it transparent, use a transparent resource or use marker.setAlpha(0.0f).
Which event should I use to detect a long press on the map?
You can use the method GoogleMap.setOnMapLongClickListener().
How can I launch an InfoWindow?
You have to add a Marker and call showInfoWindow() method on it.
How I can create some thing like this? Has it any specific name or view? Like red cycle image in below link:
You can create that view using a ListView like its explained there: https://developer.android.com/training/material/lists-cards.html.
You can create the floating button using an oval shape with an image inside and set some elevation. Click here for more info How to create a floating action button (FAB) in android, using AppCompat v21?
Have a look at general Android Material Design Guidelines to get some additional insight for these kind of ui. https://developer.android.com/design/material/index.html
This can be useful for you. I made a "dummy" Gmail UI for show a material activity transition. https://github.com/coyarzun89/FabTransitionActivity
I am working on a mapView app and I would like to have a button much like the layer button in google maps that allows someone to show or hide an option from a spinner. I have searched to try and find how to accomplish this but have been unsuccessful. Can someone point me in the right direction of what to search for or what to implement?
you can just make a custom view that has bunch of checkboxes and textviews (stacked horizontally as a bunch of relativelayouts stacked in a linearlayout). this is probably easy enough to do if you don't have a ton of items. (I'm assuming you don't because you referred to the maps options)
My application has a custom view which contains other custom views of a different type. The subviews have their own click listeners (which I can't change, as these are in 3rd party libraries). How can I intercept a user's click at the level of my view to do some processing, and then pass the click on to the proper subview?
Justin, you can play with dispatchTouchEvent() or onInterceptTouchEvent().
I'm not entirely sure about this, but in Java what I would do is define various subview objects in my main view and simply send those to the draw/paint function. That way I'd only have ONE click listener which would be in the view anyways.
Can you do something like that in Android?