Skip to content

Instantly share code, notes, and snippets.

@moneeb777
Last active May 10, 2016 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moneeb777/1237e4122e043e0cdc897c284d4484d8 to your computer and use it in GitHub Desktop.
Save moneeb777/1237e4122e043e0cdc897c284d4484d8 to your computer and use it in GitHub Desktop.
actitvity_main.xml file to display longitude and latitude coordinates captured by GPS receiver for android phone
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.android.androidlocation.MainActivity">
<TextView
android:id="@+id/latitude_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:text="Latitude"
android:textSize="16dp" />
<TextView
android:id="@+id/latitude_test"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/latitude_label"
android:layout_toRightOf="@+id/latitude_label"
android:layout_marginLeft="10dp"
android:textSize="16dp"
android:text="Latitude goes here"/>
<TextView
android:id="@+id/longitude_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="Longitude"
android:layout_marginTop="34dp"
android:textSize="16dp" />
<TextView
android:id="@+id/longitude_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/longitude_label"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/longitude_label"
android:textIsSelectable="true"
android:layout_marginTop="24dp"
android:text="Longigute does here"
android:textSize="16dp" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment