September 2015
Beginner to intermediate
356 pages
7h 27m
English
We are now going to create a custom map application. When we tap anywhere on a map, a dialog is shown, which takes text for Title and Snippet for a marker as input. The marker is placed on the clicked location along with an information window.
We can add as many markers as we need and remove a marker by tapping on the information window. Let's proceed!
Our activity layout code is the same as the one we've used before:
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment" />activity_maps.xml
Next, we need to create a custom ...
Read now
Unlock full access