86 lines
2.7 KiB
XML
86 lines
2.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:orientation="vertical"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="fill_parent"
|
|
android:background="#505050">
|
|
|
|
<!-- first we attach this table to the top of the screen
|
|
this table layout is used to display the current distance from car and the current GPS accuracy
|
|
by setting the TableLayout background is black and the table rows are grey. and then adding a margin between the 2 rows,
|
|
we get a devider line drawn -->
|
|
<TableLayout
|
|
android:id="@+id/table"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:stretchColumns="0"
|
|
android:background="#000000">
|
|
|
|
<!-- distance display -->
|
|
<TableRow
|
|
android:background="#505050"
|
|
android:layout_marginBottom="2dip">
|
|
<TextView
|
|
android:layout_column="0"
|
|
android:id="@+id/tvDistance"
|
|
android:text="Distance"
|
|
android:enabled="false"
|
|
android:textSize="22sp"
|
|
android:gravity="left"
|
|
android:textColor="#FFFFFF"
|
|
android:textStyle="bold"
|
|
/>
|
|
<TextView android:layout_column="1"
|
|
android:id="@+id/tvDistance2"
|
|
android:gravity="right"
|
|
android:text="0"
|
|
android:enabled="false"
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="26sp"
|
|
/>
|
|
</TableRow>
|
|
|
|
<!-- accuracy display -->
|
|
<TableRow android:background="#505050">
|
|
<TextView android:layout_column="0"
|
|
android:id="@+id/tvAccuracy"
|
|
android:text="Accuracy"
|
|
android:enabled="false"
|
|
android:textSize="22sp"
|
|
android:gravity="left"
|
|
android:textColor="#FFFFFF"
|
|
android:textStyle="bold"/>
|
|
<TextView android:layout_column="1"
|
|
android:id="@+id/tvAccuracy2"
|
|
android:gravity="right"
|
|
android:text="0"
|
|
android:enabled="false"
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="26sp"/>
|
|
</TableRow>
|
|
</TableLayout>
|
|
|
|
<!-- after the table we draw the mapview
|
|
|
|
warren debug key
|
|
0fQa27WZuSpscM1yDbnjrDOPs3rgB78Sc8vWsaA
|
|
|
|
ricky debug api key
|
|
0rKmsWMM0D-Ii4Y4GcF-0jomwFM4YYOyLVnH0vw
|
|
|
|
twenty codes api key
|
|
0rKmsWMM0D-K15bEM_kwabPbNhsn4dp4rcq2q5Q
|
|
-->
|
|
<com.google.android.maps.MapView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/mapview"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="fill_parent"
|
|
android:clickable="true"
|
|
android:apiKey="0rKmsWMM0D-Ii4Y4GcF-0jomwFM4YYOyLVnH0vw"
|
|
android:layout_below="@id/table"
|
|
android:layout_alignParentBottom="true"/>
|
|
|
|
</RelativeLayout> |