Guest User

Untitled

a guest
Oct 8th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.72 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:id="@+id/activity_calc"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. tools:context="com.example.kaspero.coolcalc.CalcActivity"
  9. android:background="#ffffff">
  10.  
  11. <LinearLayout
  12. android:orientation="vertical"
  13. android:layout_width="match_parent"
  14. android:layout_height="match_parent"
  15. android:layout_alignParentTop="true"
  16. android:layout_alignParentStart="true">
  17.  
  18. <LinearLayout
  19. android:orientation="vertical"
  20. android:layout_width="match_parent"
  21. android:layout_height="150dp"
  22. android:background="@android:color/holo_blue_dark"
  23. android:layout_alignParentTop="true"
  24. android:layout_alignParentStart="true"
  25. android:layout_weight="1">
  26.  
  27. <TextView
  28. android:text="5633"
  29. android:layout_height="wrap_content"
  30. android:id="@+id/textView2"
  31. android:textSize="45sp"
  32. android:layout_gravity="right"
  33. android:gravity="right"
  34. android:layout_width="match_parent"
  35. android:paddingRight="10dp"
  36. android:paddingLeft="10dp"
  37. android:paddingTop="50dp" />
  38.  
  39. <ImageView
  40. android:layout_width="match_parent"
  41. android:layout_height="wrap_content"
  42. app:srcCompat="@mipmap/ic_launcher"
  43. android:id="@+id/imageView" />
  44.  
  45. </LinearLayout>
  46.  
  47. <LinearLayout
  48. android:orientation="horizontal"
  49. android:layout_width="match_parent"
  50. android:layout_height="90dp"
  51. android:weightSum="4"
  52. android:layout_weight="1">
  53.  
  54. <Button
  55. android:text="7"
  56. android:layout_width="match_parent"
  57. android:layout_height="match_parent"
  58. android:id="@+id/button6"
  59. android:layout_weight="1"
  60. android:background="@android:color/white"
  61. android:textColor="@android:color/background_dark"
  62. android:textSize="30sp" />
  63.  
  64. <Button
  65. android:text="8"
  66. android:layout_width="match_parent"
  67. android:layout_height="match_parent"
  68. android:id="@+id/button5"
  69. android:layout_weight="1"
  70. android:background="@android:color/white"
  71. android:textColor="@android:color/background_dark"
  72. android:textSize="30sp" />
  73.  
  74. <Button
  75. android:text="9"
  76. android:layout_width="match_parent"
  77. android:layout_height="match_parent"
  78. android:id="@+id/button4"
  79. android:layout_weight="1"
  80. android:background="@android:color/white"
  81. android:textColor="@android:color/background_dark"
  82. android:textSize="30sp" />
  83.  
  84. <ImageButton
  85. android:layout_width="match_parent"
  86. android:layout_height="match_parent"
  87. app:srcCompat="@drawable/divide"
  88. android:id="@+id/imageButton"
  89. android:layout_weight="1"
  90. android:background="@android:color/background_light" />
  91.  
  92. </LinearLayout>
  93.  
  94. <LinearLayout
  95. android:orientation="horizontal"
  96. android:layout_width="match_parent"
  97. android:layout_height="90dp"
  98. android:weightSum="4"
  99. android:layout_weight="1">
  100.  
  101. <Button
  102. android:text="4"
  103. android:layout_width="match_parent"
  104. android:layout_height="match_parent"
  105. android:id="@+id/button6"
  106. android:layout_weight="1"
  107. android:background="@android:color/white"
  108. android:textColor="@android:color/background_dark"
  109. android:textSize="30sp" />
  110.  
  111. <Button
  112. android:text="5"
  113. android:layout_width="match_parent"
  114. android:layout_height="match_parent"
  115. android:id="@+id/button5"
  116. android:layout_weight="1"
  117. android:background="@android:color/white"
  118. android:textColor="@android:color/background_dark"
  119. android:textSize="30sp" />
  120.  
  121. <Button
  122. android:text="6"
  123. android:layout_width="match_parent"
  124. android:layout_height="match_parent"
  125. android:id="@+id/button4"
  126. android:layout_weight="1"
  127. android:background="@android:color/white"
  128. android:textColor="@android:color/background_dark"
  129. android:textSize="30sp" />
  130.  
  131. <ImageButton
  132. android:layout_width="match_parent"
  133. android:layout_height="match_parent"
  134. app:srcCompat="@drawable/multiply"
  135. android:id="@+id/imageButton"
  136. android:layout_weight="1"
  137. android:background="@android:color/background_light"
  138. android:elevation="0dp" />
  139.  
  140. </LinearLayout>
  141.  
  142. <LinearLayout
  143. android:orientation="horizontal"
  144. android:layout_width="match_parent"
  145. android:layout_height="90dp"
  146. android:weightSum="4">
  147.  
  148. <Button
  149. android:text="1"
  150. android:layout_width="match_parent"
  151. android:layout_height="match_parent"
  152. android:id="@+id/button6"
  153. android:layout_weight="1"
  154. android:background="@android:color/white"
  155. android:textColor="@android:color/background_dark"
  156. android:textSize="30sp" />
  157.  
  158. <Button
  159. android:text="2"
  160. android:layout_width="match_parent"
  161. android:layout_height="match_parent"
  162. android:id="@+id/button5"
  163. android:layout_weight="1"
  164. android:background="@android:color/white"
  165. android:textColor="@android:color/background_dark"
  166. android:textSize="30sp" />
  167.  
  168. <Button
  169. android:text="3"
  170. android:layout_width="match_parent"
  171. android:layout_height="match_parent"
  172. android:id="@+id/button4"
  173. android:layout_weight="1"
  174. android:background="@android:color/white"
  175. android:textColor="@android:color/background_dark"
  176. android:textSize="30sp" />
  177.  
  178. <ImageButton
  179. android:layout_width="match_parent"
  180. android:layout_height="match_parent"
  181. app:srcCompat="@drawable/subtract"
  182. android:id="@+id/imageButton"
  183. android:layout_weight="1"
  184. android:background="@android:color/background_light" />
  185.  
  186. </LinearLayout>
  187.  
  188. <LinearLayout
  189. android:orientation="horizontal"
  190. android:layout_width="match_parent"
  191. android:layout_height="90dp">
  192.  
  193. <LinearLayout
  194. android:orientation="vertical"
  195. android:layout_height="match_parent"
  196. android:layout_width="192dp"
  197. android:gravity="center">
  198.  
  199. <Button
  200. android:text="CLEAR"
  201. android:layout_width="150dp"
  202. android:layout_height="wrap_content"
  203. android:id="@+id/button3"
  204. android:textSize="25sp"
  205. android:background="@android:color/holo_blue_dark" />
  206. </LinearLayout>
  207.  
  208. <Button
  209. android:text="0"
  210. android:layout_width="96dp"
  211. android:layout_height="match_parent"
  212. android:id="@+id/button4"
  213. android:background="@android:color/white"
  214. android:textColor="@android:color/background_dark"
  215. android:textSize="30sp" />
  216.  
  217. <ImageButton
  218. android:layout_width="match_parent"
  219. android:layout_height="match_parent"
  220. app:srcCompat="@drawable/add"
  221. android:id="@+id/imageButton"
  222. android:background="@android:color/background_light" />
  223.  
  224. </LinearLayout>
  225.  
  226. </LinearLayout>
  227.  
  228. </RelativeLayout>
Add Comment
Please, Sign In to add comment