Page 59

Android Programming Cookbook

51 / 143

Figure 3.20: Import completed. After downloading the Google Play Service package, just import this project into the main Android Google Maps v2 project.

3.4

Create the layout of the main Google Maps v2

We are going to make a simple layout xml for the AndroidGoogleMapsExample.java, that consists of a parent Relati veLayout and a child LinearLayout with vertical orientation, that includes a Google Map Fragment and a horizontal LinearLayout that includes 3 Buttons that lister to the corresponding actions. Open res/layout/activity_main.xml, go to the respective xml tab and paste the following: activity_main.xml <RelativeLayout xmlns:android="https://schemas.android.com/apk/res/android" xmlns:tools="https://schemas.android.com/tools"

SKY MAGZ  

This is Yahya Christian School Magazine

Read more
Read more
Similar to
Popular now
Just for you