Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.85 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.constraint.ConstraintLayout
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. xmlns:app="http://schemas.android.com/apk/res-auto"
  5. xmlns:tools="http://schemas.android.com/tools"
  6. android:id="@+id/activity_main"
  7. android:layout_width="match_parent"
  8. android:layout_height="match_parent"
  9. tools:context="cis.gvsu.edu.geocalculator.MainActivity">
  10.  
  11. <EditText
  12. android:id="@+id/p1Lat"
  13. android:layout_width="0dp"
  14. android:layout_height="wrap_content"
  15. android:layout_marginLeft="16dp"
  16. android:layout_marginRight="8dp"
  17. android:layout_marginTop="16dp"
  18. android:ems="10"
  19. android:hint="Enter latitude for p1"
  20. android:inputType="numberSigned|numberDecimal"
  21. app:layout_constraintHorizontal_bias="0.0"
  22. app:layout_constraintLeft_toLeftOf="parent"
  23. app:layout_constraintRight_toLeftOf="@+id/guideline"
  24. app:layout_constraintTop_toTopOf="parent"/>
  25.  
  26. <EditText
  27. android:id="@+id/p1Lng"
  28. android:layout_width="0dp"
  29. android:layout_height="wrap_content"
  30. android:layout_marginLeft="8dp"
  31. android:layout_marginRight="16dp"
  32. android:layout_marginTop="16dp"
  33. android:ems="10"
  34. android:hint="Enter longitude for p1"
  35. android:inputType="numberSigned|numberDecimal"
  36. app:layout_constraintHorizontal_bias="0.0"
  37. app:layout_constraintLeft_toLeftOf="@+id/guideline"
  38. app:layout_constraintRight_toRightOf="parent"
  39. app:layout_constraintTop_toTopOf="parent"/>
  40.  
  41. <EditText
  42. android:id="@+id/p2Lat"
  43. android:layout_width="0dp"
  44. android:layout_height="wrap_content"
  45. android:layout_marginLeft="0dp"
  46. android:layout_marginRight="0dp"
  47. android:layout_marginTop="8dp"
  48. android:ems="10"
  49. android:hint="Enter latitude for p2"
  50. android:inputType="numberSigned|numberDecimal"
  51. app:layout_constraintHorizontal_bias="0.0"
  52. app:layout_constraintLeft_toLeftOf="@+id/p1Lat"
  53. app:layout_constraintRight_toRightOf="@+id/p1Lat"
  54. app:layout_constraintTop_toBottomOf="@+id/p1Lat"/>
  55.  
  56. <EditText
  57. android:id="@+id/p2Lng"
  58. android:layout_width="0dp"
  59. android:layout_height="wrap_content"
  60. android:layout_marginLeft="0dp"
  61. android:layout_marginRight="0dp"
  62. android:layout_marginTop="8dp"
  63. android:ems="10"
  64. android:hint="Enter longitude for p2"
  65. android:inputType="numberSigned|numberDecimal"
  66. app:layout_constraintHorizontal_bias="0.0"
  67. app:layout_constraintLeft_toLeftOf="@+id/p1Lng"
  68. app:layout_constraintRight_toRightOf="@+id/p1Lng"
  69. app:layout_constraintTop_toBottomOf="@+id/p1Lng"/>
  70.  
  71. <Button
  72. android:id="@+id/calc"
  73. android:layout_width="wrap_content"
  74. android:layout_height="wrap_content"
  75. android:layout_marginLeft="0dp"
  76. android:layout_marginTop="8dp"
  77. android:text="Calculate"
  78. app:layout_constraintLeft_toLeftOf="@+id/p1Lat"
  79. app:layout_constraintTop_toBottomOf="@+id/p2Lat"/>
  80.  
  81. <Button
  82. android:id="@+id/clear"
  83. android:layout_width="wrap_content"
  84. android:layout_height="wrap_content"
  85. android:layout_marginRight="0dp"
  86. android:layout_marginTop="8dp"
  87. android:text="Clear"
  88. app:layout_constraintRight_toRightOf="@+id/p1Lng"
  89. app:layout_constraintTop_toBottomOf="@+id/p2Lng"/>
  90.  
  91. <TextView
  92. android:id="@+id/distance"
  93. android:layout_width="0dp"
  94. android:layout_height="wrap_content"
  95. android:layout_marginLeft="0dp"
  96. android:layout_marginRight="0dp"
  97. android:layout_marginTop="8dp"
  98. android:text="Distance:"
  99. app:layout_constraintLeft_toLeftOf="@+id/p1Lat"
  100. app:layout_constraintRight_toRightOf="@+id/p1Lng"
  101. app:layout_constraintTop_toBottomOf="@+id/calc"
  102. tools:layout_constraintBottom_creator="1"
  103. tools:layout_constraintLeft_creator="1"/>
  104.  
  105. <TextView
  106. android:id="@+id/bearing"
  107. android:layout_width="0dp"
  108. android:layout_height="wrap_content"
  109. android:layout_marginLeft="0dp"
  110. android:layout_marginRight="0dp"
  111. android:layout_marginTop="8dp"
  112. android:text="Bearing:"
  113. app:layout_constraintLeft_toLeftOf="@+id/p1Lat"
  114. app:layout_constraintRight_toRightOf="@+id/p1Lng"
  115. app:layout_constraintTop_toBottomOf="@+id/distance"/>
  116.  
  117. <android.support.constraint.Guideline
  118. android:id="@+id/guideline"
  119. android:layout_width="wrap_content"
  120. android:layout_height="wrap_content"
  121. android:orientation="vertical"
  122. app:layout_constraintGuide_percent="0.5"/>
  123.  
  124. </android.support.constraint.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement