Advertisement
Guest User

main_activity

a guest
Sep 16th, 2018
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.24 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:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:paddingBottom="@dimen/activity_vertical_margin"
  8. android:paddingLeft="@dimen/activity_horizontal_margin"
  9. android:paddingRight="@dimen/activity_horizontal_margin"
  10. android:paddingTop="@dimen/activity_vertical_margin"
  11. tools:context="com.devv.niki.calculator.MainActivity">
  12.  
  13. <TextView
  14. android:id="@+id/infoTextView"
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content"
  17. android:layout_marginBottom="30dp"
  18. android:textSize="30sp" />
  19.  
  20. <EditText
  21. android:id="@+id/editText"
  22. android:layout_width="match_parent"
  23. android:layout_height="wrap_content"
  24. android:enabled="false"
  25. android:gravity="bottom"
  26. android:lines="2"
  27. android:maxLines="2"
  28. android:textSize="20sp"
  29. android:layout_marginTop="83dp"
  30. android:layout_below="@+id/infoTextView"
  31. android:layout_alignParentLeft="true"
  32. android:layout_alignParentStart="true" />
  33.  
  34. <Button
  35. android:id="@+id/buttonSeven"
  36. style="@style/Widget.AppCompat.Button.Borderless"
  37. android:layout_width="wrap_content"
  38. android:layout_height="wrap_content"
  39. android:layout_below="@id/editText"
  40. android:text="7"
  41. android:textSize="20sp" />
  42.  
  43. <Button
  44. android:id="@+id/buttonEight"
  45. style="@style/Widget.AppCompat.Button.Borderless"
  46. android:layout_width="wrap_content"
  47. android:layout_height="wrap_content"
  48. android:layout_below="@id/editText"
  49. android:layout_toRightOf="@id/buttonSeven"
  50. android:text="8"
  51. android:textSize="20sp" />
  52.  
  53. <Button
  54. android:id="@+id/buttonNine"
  55. style="@style/Widget.AppCompat.Button.Borderless"
  56. android:layout_width="wrap_content"
  57. android:layout_height="wrap_content"
  58. android:layout_below="@id/editText"
  59. android:layout_toRightOf="@id/buttonEight"
  60. android:text="9"
  61. android:textSize="20sp" />
  62.  
  63. <Button
  64. android:id="@+id/buttonFour"
  65. style="@style/Widget.AppCompat.Button.Borderless"
  66. android:layout_width="wrap_content"
  67. android:layout_height="wrap_content"
  68. android:layout_below="@id/buttonSeven"
  69. android:text="4"
  70. android:textSize="20sp" />
  71.  
  72. <Button
  73. android:id="@+id/buttonFive"
  74. style="@style/Widget.AppCompat.Button.Borderless"
  75. android:layout_width="wrap_content"
  76. android:layout_height="wrap_content"
  77. android:layout_alignRight="@id/buttonEight"
  78. android:layout_below="@id/buttonEight"
  79. android:text="5"
  80. android:textSize="20sp" />
  81.  
  82. <Button
  83. android:id="@+id/buttonSix"
  84. style="@style/Widget.AppCompat.Button.Borderless"
  85. android:layout_width="wrap_content"
  86. android:layout_height="wrap_content"
  87. android:layout_alignRight="@id/buttonNine"
  88. android:layout_below="@id/buttonNine"
  89. android:text="6"
  90. android:textSize="20sp" />
  91.  
  92. <Button
  93. android:id="@+id/buttonOne"
  94. style="@style/Widget.AppCompat.Button.Borderless"
  95. android:layout_width="wrap_content"
  96. android:layout_height="wrap_content"
  97. android:layout_below="@id/buttonFour"
  98. android:text="1"
  99. android:textSize="20sp" />
  100.  
  101. <Button
  102. android:id="@+id/buttonTwo"
  103. style="@style/Widget.AppCompat.Button.Borderless"
  104. android:layout_width="wrap_content"
  105. android:layout_height="wrap_content"
  106. android:layout_alignRight="@id/buttonEight"
  107. android:layout_below="@id/buttonFive"
  108. android:text="2"
  109. android:textSize="20sp" />
  110.  
  111. <Button
  112. android:id="@+id/buttonThree"
  113. style="@style/Widget.AppCompat.Button.Borderless"
  114. android:layout_width="wrap_content"
  115. android:layout_height="wrap_content"
  116. android:layout_alignRight="@id/buttonNine"
  117. android:layout_below="@id/buttonSix"
  118. android:text="3"
  119. android:textSize="20sp" />
  120.  
  121. <Button
  122. android:id="@+id/buttonDot"
  123. style="@style/Widget.AppCompat.Button.Borderless"
  124. android:layout_width="wrap_content"
  125. android:layout_height="wrap_content"
  126. android:layout_below="@id/buttonOne"
  127. android:text="."
  128. android:textSize="20sp" />
  129.  
  130. <Button
  131. android:id="@+id/buttonZero"
  132. style="@style/Widget.AppCompat.Button.Borderless"
  133. android:layout_width="wrap_content"
  134. android:layout_height="wrap_content"
  135. android:layout_alignRight="@id/buttonEight"
  136. android:layout_below="@id/buttonTwo"
  137. android:text="0"
  138. android:textSize="20sp" />
  139.  
  140. <Button
  141. android:id="@+id/buttonEqual"
  142. style="@style/Widget.AppCompat.Button.Borderless"
  143. android:layout_width="wrap_content"
  144. android:layout_height="wrap_content"
  145. android:layout_alignRight="@id/buttonNine"
  146. android:layout_below="@id/buttonThree"
  147. android:text="="
  148. android:textSize="20sp" />
  149.  
  150. <Button
  151. android:id="@+id/buttonDivide"
  152. style="@style/Widget.AppCompat.Button.Borderless"
  153. android:layout_width="wrap_content"
  154. android:layout_height="wrap_content"
  155. android:layout_alignTop="@id/buttonNine"
  156. android:layout_toRightOf="@id/buttonNine"
  157. android:text="/"
  158. android:textSize="20sp" />
  159.  
  160. <Button
  161. android:id="@+id/buttonMultiply"
  162. style="@style/Widget.AppCompat.Button.Borderless"
  163. android:layout_width="wrap_content"
  164. android:layout_height="wrap_content"
  165. android:layout_alignTop="@id/buttonSix"
  166. android:layout_toRightOf="@id/buttonSix"
  167. android:text="*"
  168. android:textSize="20sp" />
  169.  
  170. <Button
  171. android:id="@+id/buttonSubtract"
  172. style="@style/Widget.AppCompat.Button.Borderless"
  173. android:layout_width="wrap_content"
  174. android:layout_height="wrap_content"
  175. android:layout_alignTop="@id/buttonThree"
  176. android:layout_toRightOf="@id/buttonThree"
  177. android:text="-"
  178. android:textSize="20sp" />
  179.  
  180. <Button
  181. android:id="@+id/buttonAdd"
  182. style="@style/Widget.AppCompat.Button.Borderless"
  183. android:layout_width="wrap_content"
  184. android:layout_height="wrap_content"
  185. android:layout_alignTop="@id/buttonEqual"
  186. android:layout_toRightOf="@id/buttonEqual"
  187. android:text="+"
  188. android:textSize="20sp" />
  189.  
  190. <Button
  191. android:id="@+id/buttonClear"
  192. style="@style/Widget.AppCompat.Button.Borderless"
  193. android:layout_width="wrap_content"
  194. android:layout_height="wrap_content"
  195. android:layout_alignRight="@id/buttonAdd"
  196. android:layout_below="@id/buttonAdd"
  197. android:layout_marginTop="@dimen/activity_vertical_margin"
  198. android:text="C"
  199. android:textSize="20sp" />
  200.  
  201. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement