读书人

Android施用Google Map API创建的一个

发布时间: 2012-09-21 15:47:26 作者: rapoo

Android使用Google Map API创建的一个根据经纬度定位的程序一

?

?
Android施用Google Map API创建的一个根据经纬度定位的程序一

(2)项目的目录如下图:
Android施用Google Map API创建的一个根据经纬度定位的程序一

<?xml version="1.0" encoding="utf-8"?>

<AbsoluteLayout

? android:id="@+id/layout1"

? android:layout_width="fill_parent"

? android:layout_height="fill_parent"

? android:background="@drawable/white"

? xmlns:android="http://schemas.android.com/apk/res/android"

>?

? <EditText

??? android:id="@+id/myEdit1"

??? android:layout_width="105px"

??? android:layout_height="40px"

??? android:textSize="16sp"

??? android:layout_x="130px"

??? android:layout_y="12px"

??? android:numeric="decimal"

? >

? </EditText>

? <EditText

??? android:id="@+id/myEdit2"

??? android:layout_width="105px"

??? android:layout_height="40px"

??? android:textSize="16sp"

??? android:layout_x="130px"

??? android:layout_y="52px"

??? android:numeric="decimal"

? >

? </EditText>

? <TextView

??? android:id="@+id/myText1"

??? android:layout_width="wrap_content"

??? android:layout_height="wrap_content"

??? android:text="@string/str_longitude"

??? android:textColor="@drawable/blue"

??? android:layout_x="10px"

??? android:layout_y="22px"

? >

? </TextView>

? <TextView

??? android:id="@+id/myText2"

??? android:layout_width="wrap_content"

??? android:layout_height="wrap_content"

??? android:text="@string/str_latitude"

??? android:textColor="@drawable/blue"

??? android:layout_x="10px"

??? android:layout_y="62px"

? >

? </TextView>

? <Button

??? android:id="@+id/myButton1"

??? android:layout_width="77px"

??? android:layout_height="45px"

??? android:text="@string/str_button1"

??? android:layout_x="240px"

??? android:layout_y="12px"

? >

? </Button>

? <Button

??? android:id="@+id/myButton2"

??? android:layout_width="40px"

??? android:layout_height="40px"

??? android:text="@string/str_button2"

??? android:textSize="20sp"

??? android:layout_x="277px"

??? android:layout_y="55px"

? ></Button>

? <Button

??? android:id="@+id/myButton3"

??? android:layout_width="40px"

??? android:layout_height="40px"

??? android:text="@string/str_button3"

??? android:textSize="20sp"

??? android:layout_x="240px"

??? android:layout_y="55px"

? >?

</Button>

?? <com.google.android.maps.MapView

??? android:id="@+id/myMapView1"

??? android:layout_width="fill_parent"?

??? android:layout_height="fill_parent"

??? android:layout_x="0px"

??? android:layout_y="102px"

??? android:enabled="true"

??? android:clickable="true"

??? android:apiKey="0IJzdEVboTS_thBehcSjwAfSzTxroBH2XoeMOLQ"

? >

? </com.google.android.maps.MapView>

</AbsoluteLayout>

?

?

读书人网 >Android

热点推荐