Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.09 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout
  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:orientation="vertical"
  7. android:id="@+id/activity_main"
  8. android:layout_width="match_parent"
  9. android:layout_height="match_parent"
  10. android:padding="8dp"
  11. tools:context="com.example.orestis.part1.MainActivity">
  12.  
  13. <LinearLayout
  14. android:orientation="vertical"
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content"
  17. android:id="@+id/linearLayout">
  18.  
  19. <RelativeLayout
  20. android:layout_width="match_parent"
  21. android:layout_height="wrap_content"
  22. android:orientation="horizontal">
  23.  
  24. <TextView
  25. style="@style/mystyle"
  26. android:layout_width="wrap_content"
  27. android:layout_height="wrap_content"
  28. android:text="@string/score"
  29. app:layout_constraintBottom_toBottomOf="parent"
  30. app:layout_constraintLeft_toLeftOf="parent"
  31. app:layout_constraintRight_toRightOf="parent"
  32. app:layout_constraintTop_toTopOf="parent"
  33. android:id="@+id/textView" />
  34.  
  35. <TextView
  36. style="@style/mystyle"
  37. android:id="@+id/score"
  38. android:layout_width="wrap_content"
  39. android:layout_height="wrap_content"
  40. android:layout_alignParentTop="true"
  41. android:layout_toEndOf="@+id/textView"
  42. app:layout_constraintBottom_toBottomOf="parent"
  43. app:layout_constraintLeft_toLeftOf="parent"
  44. app:layout_constraintRight_toRightOf="parent"
  45. app:layout_constraintTop_toTopOf="parent" />
  46.  
  47. </RelativeLayout>
  48.  
  49. <RelativeLayout
  50. android:layout_width="match_parent"
  51. android:layout_height="wrap_content"
  52. android:orientation="horizontal">
  53.  
  54. <TextView
  55. style="@style/mystyle"
  56. android:layout_width="wrap_content"
  57. android:layout_height="wrap_content"
  58. android:text="@string/highest_score"
  59. app:layout_constraintBottom_toBottomOf="parent"
  60. app:layout_constraintLeft_toLeftOf="parent"
  61. app:layout_constraintRight_toRightOf="parent"
  62. app:layout_constraintTop_toTopOf="parent"
  63. android:id="@+id/textView2" />
  64.  
  65. <TextView
  66. style="@style/mystyle"
  67. android:id="@+id/highestScore"
  68. android:layout_width="wrap_content"
  69. android:layout_height="wrap_content"
  70. android:layout_alignParentTop="true"
  71. android:layout_toEndOf="@+id/textView2"
  72. app:layout_constraintBottom_toBottomOf="parent"
  73. app:layout_constraintLeft_toLeftOf="parent"
  74. app:layout_constraintRight_toRightOf="parent"
  75. app:layout_constraintTop_toTopOf="parent" />
  76.  
  77. </RelativeLayout>
  78.  
  79. <RelativeLayout
  80. android:layout_width="match_parent"
  81. android:layout_height="wrap_content"
  82. android:orientation="horizontal">
  83.  
  84. <TextView
  85. style="@style/mystyle"
  86. android:layout_width="wrap_content"
  87. android:layout_height="wrap_content"
  88. android:text="@string/streak"
  89. app:layout_constraintBottom_toBottomOf="parent"
  90. app:layout_constraintLeft_toLeftOf="parent"
  91. app:layout_constraintRight_toRightOf="parent"
  92. app:layout_constraintTop_toTopOf="parent"
  93. android:id="@+id/textView3" />
  94.  
  95. <TextView
  96. style="@style/mystyle"
  97. android:id="@+id/streak"
  98. android:layout_width="wrap_content"
  99. android:layout_height="wrap_content"
  100. android:layout_alignParentTop="true"
  101. android:layout_toEndOf="@+id/textView3"
  102. app:layout_constraintBottom_toBottomOf="parent"
  103. app:layout_constraintLeft_toLeftOf="parent"
  104. app:layout_constraintRight_toRightOf="parent"
  105. app:layout_constraintTop_toTopOf="parent" />
  106.  
  107. </RelativeLayout>
  108.  
  109. </LinearLayout>
  110.  
  111. <RelativeLayout
  112. android:layout_width="match_parent"
  113. android:layout_height="wrap_content"
  114. android:layout_alignParentBottom="true"
  115. android:orientation="horizontal"
  116. android:padding="40dp"
  117. android:id="@+id/relativeLayout">
  118.  
  119. <Button
  120. style="@style/buttonStyle"
  121. android:id="@+id/heads"
  122. android:onClick="setHeads"
  123. android:text="@string/heads" />
  124. <Button
  125. style="@style/buttonStyle"
  126. android:id="@+id/tails"
  127. android:onClick="setTails"
  128. android:layout_alignParentEnd="true"
  129. android:layout_alignParentTop="true"
  130. android:text="@string/tails" />
  131. </RelativeLayout>
  132.  
  133. <TextView
  134. style="@style/mystyle"
  135. android:layout_width="wrap_content"
  136. android:layout_height="wrap_content"
  137. android:layout_above="@+id/relativeLayout2"
  138. android:layout_centerHorizontal="true"
  139. android:text="@string/coin_toss_result" />
  140.  
  141. <RelativeLayout
  142. android:layout_width="match_parent"
  143. android:layout_height="wrap_content"
  144. android:layout_above="@+id/relativeLayout"
  145. android:layout_alignParentStart="true"
  146. android:orientation="horizontal"
  147. android:id="@+id/relativeLayout2">
  148.  
  149. <TextView
  150. style="@style/mystyle"
  151. android:id="@+id/result"
  152. android:layout_width="wrap_content"
  153. android:layout_height="wrap_content"
  154. android:layout_centerHorizontal="true"
  155. />
  156.  
  157. </RelativeLayout>
  158.  
  159. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement