coolbud012

Calculator Layout

Feb 1st, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:layout_marginTop="12dp"
  6. android:padding="15dp" >
  7.  
  8. <TextView
  9. android:id="@+id/tv_tys_Timer"
  10. android:layout_width="wrap_content"
  11. android:layout_height="wrap_content"
  12. android:layout_alignParentRight="true"
  13. android:layout_alignParentTop="true"
  14. android:gravity="center"
  15. android:text="01:25"
  16. android:textAppearance="?android:textAppearanceMedium"
  17. android:textColor="#000" />
  18.  
  19. <LinearLayout
  20. android:id="@+id/ll_tys_Main"
  21. android:layout_width="fill_parent"
  22. android:layout_height="wrap_content"
  23. android:layout_alignParentTop="true"
  24. android:layout_marginTop="15.0dip"
  25. android:orientation="horizontal"
  26. android:padding="5.0dip" >
  27.  
  28. <TextView
  29. android:id="@+id/tv_tys_Questions"
  30. android:layout_width="wrap_content"
  31. android:layout_height="wrap_content"
  32. android:layout_weight="3"
  33. android:gravity="center"
  34. android:text="Questions"
  35. android:textAppearance="?android:textAppearanceLarge"
  36. android:textColor="#000"
  37. android:textSize="28.0sp" />
  38.  
  39. <TextView
  40. android:id="@+id/tv_tys_NumberOfQuestions"
  41. android:layout_width="wrap_content"
  42. android:layout_height="wrap_content"
  43. android:layout_weight="1"
  44. android:gravity="center"
  45. android:text="5/15"
  46. android:textAppearance="?android:textAppearanceMedium" />
  47. </LinearLayout>
  48.  
  49. <TextView
  50. android:id="@+id/tv_tys_Answers"
  51. android:layout_width="wrap_content"
  52. android:layout_height="wrap_content"
  53. android:layout_below="@+id/ll_tys_Main"
  54. android:text="Answers"
  55. android:textColor="#000"
  56. android:textSize="28.0sp" />
  57.  
  58. <LinearLayout
  59. android:layout_width="match_parent"
  60. android:layout_height="wrap_content"
  61. android:layout_below="@+id/tv_tys_Answers"
  62. android:layout_marginTop="24dp"
  63. android:orientation="vertical" >
  64.  
  65. <LinearLayout
  66. android:layout_width="match_parent"
  67. android:layout_height="wrap_content"
  68. android:orientation="horizontal" >
  69.  
  70. <Button
  71. android:id="@+id/bOne"
  72. android:layout_width="match_parent"
  73. android:layout_height="wrap_content"
  74. android:layout_weight="1"
  75. android:text="1" />
  76.  
  77. <Button
  78. android:id="@+id/bTwo"
  79. android:layout_width="match_parent"
  80. android:layout_height="wrap_content"
  81. android:layout_weight="1"
  82. android:text="2" />
  83.  
  84. <Button
  85. android:id="@+id/bThree"
  86. android:layout_width="match_parent"
  87. android:layout_height="wrap_content"
  88. android:layout_weight="1"
  89. android:text="3" />
  90. </LinearLayout>
  91.  
  92. <LinearLayout
  93. android:layout_width="match_parent"
  94. android:layout_height="wrap_content"
  95. android:orientation="horizontal" >
  96.  
  97. <Button
  98. android:id="@+id/bFour"
  99. android:layout_width="wrap_content"
  100. android:layout_height="wrap_content"
  101. android:layout_weight="1"
  102. android:text="4" />
  103.  
  104. <Button
  105. android:id="@+id/bFive"
  106. android:layout_width="wrap_content"
  107. android:layout_height="wrap_content"
  108. android:layout_weight="1"
  109. android:text="5" />
  110.  
  111. <Button
  112. android:id="@+id/bSix"
  113. android:layout_width="wrap_content"
  114. android:layout_height="wrap_content"
  115. android:layout_weight="1"
  116. android:text="6" />
  117. </LinearLayout>
  118.  
  119. <LinearLayout
  120. android:layout_width="match_parent"
  121. android:layout_height="wrap_content"
  122. android:orientation="horizontal" >
  123.  
  124. <Button
  125. android:id="@+id/bSeven"
  126. android:layout_width="wrap_content"
  127. android:layout_height="wrap_content"
  128. android:layout_weight="1"
  129. android:text="7" />
  130.  
  131. <Button
  132. android:id="@+id/bEight"
  133. android:layout_width="wrap_content"
  134. android:layout_height="wrap_content"
  135. android:layout_weight="1"
  136. android:text="8" />
  137.  
  138. <Button
  139. android:id="@+id/bNine"
  140. android:layout_width="wrap_content"
  141. android:layout_height="wrap_content"
  142. android:layout_weight="1"
  143. android:text="9" />
  144. </LinearLayout>
  145.  
  146. <LinearLayout
  147. android:layout_width="match_parent"
  148. android:layout_height="wrap_content"
  149. android:orientation="horizontal" >
  150.  
  151. <Button
  152. android:id="@+id/bZero"
  153. android:layout_width="wrap_content"
  154. android:layout_height="wrap_content"
  155. android:layout_weight="1"
  156. android:text="0" />
  157.  
  158. <Button
  159. android:id="@+id/bClear"
  160. android:layout_width="wrap_content"
  161. android:layout_height="wrap_content"
  162. android:layout_weight="3"
  163. android:text="Clear" />
  164. </LinearLayout>
  165. </LinearLayout>
  166.  
  167.  
  168. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment