Advertisement
Guest User

ok

a guest
Aug 7th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. <layout>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. android:id="@+id/activity_main"
  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.sample.foo.samplecalculator.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:layout_below="@id/infoTextView"
  25. android:enabled="false"
  26. android:gravity="bottom"
  27. android:lines="2"
  28. android:maxLines="2"
  29. android:textSize="20sp" />
  30.  
  31. <Button
  32. android:id="@+id/buttonSeven"
  33. style="@style/Widget.AppCompat.Button.Borderless"
  34. android:layout_width="wrap_content"
  35. android:layout_height="wrap_content"
  36. android:layout_below="@id/editText"
  37. android:text="7"
  38. android:textSize="20sp" />
  39.  
  40. <Button
  41. android:id="@+id/buttonEight"
  42. style="@style/Widget.AppCompat.Button.Borderless"
  43. android:layout_width="wrap_content"
  44. android:layout_height="wrap_content"
  45. android:layout_below="@id/editText"
  46. android:layout_toRightOf="@id/buttonSeven"
  47. android:text="8"
  48. android:textSize="20sp" />
  49.  
  50. <Button
  51. android:id="@+id/buttonNine"
  52. style="@style/Widget.AppCompat.Button.Borderless"
  53. android:layout_width="wrap_content"
  54. android:layout_height="wrap_content"
  55. android:layout_below="@id/editText"
  56. android:layout_toRightOf="@id/buttonEight"
  57. android:text="9"
  58. android:textSize="20sp" />
  59.  
  60. ...
  61.  
  62. ...
  63.  
  64. <Button
  65. android:id="@+id/buttonDot"
  66. style="@style/Widget.AppCompat.Button.Borderless"
  67. android:layout_width="wrap_content"
  68. android:layout_height="wrap_content"
  69. android:layout_below="@id/buttonOne"
  70. android:text="."
  71. android:textSize="20sp" />
  72.  
  73. <Button
  74. android:id="@+id/buttonZero"
  75. style="@style/Widget.AppCompat.Button.Borderless"
  76. android:layout_width="wrap_content"
  77. android:layout_height="wrap_content"
  78. android:layout_alignRight="@id/buttonEight"
  79. android:layout_below="@id/buttonTwo"
  80. android:text="0"
  81. android:textSize="20sp" />
  82.  
  83. <Button
  84. android:id="@+id/buttonEqual"
  85. style="@style/Widget.AppCompat.Button.Borderless"
  86. android:layout_width="wrap_content"
  87. android:layout_height="wrap_content"
  88. android:layout_alignRight="@id/buttonNine"
  89. android:layout_below="@id/buttonThree"
  90. android:text="="
  91. android:textSize="20sp" />
  92.  
  93. <Button
  94. android:id="@+id/buttonDivide"
  95. style="@style/Widget.AppCompat.Button.Borderless"
  96. android:layout_width="wrap_content"
  97. android:layout_height="wrap_content"
  98. android:layout_alignTop="@id/buttonNine"
  99. android:layout_toRightOf="@id/buttonNine"
  100. android:text="/"
  101. android:textSize="20sp" />
  102.  
  103. <Button
  104. android:id="@+id/buttonMultiply"
  105. style="@style/Widget.AppCompat.Button.Borderless"
  106. android:layout_width="wrap_content"
  107. android:layout_height="wrap_content"
  108. android:layout_alignTop="@id/buttonSix"
  109. android:layout_toRightOf="@id/buttonSix"
  110. android:text="*"
  111. android:textSize="20sp" />
  112.  
  113. <Button
  114. android:id="@+id/buttonSubtract"
  115. style="@style/Widget.AppCompat.Button.Borderless"
  116. android:layout_width="wrap_content"
  117. android:layout_height="wrap_content"
  118. android:layout_alignTop="@id/buttonThree"
  119. android:layout_toRightOf="@id/buttonThree"
  120. android:text="-"
  121. android:textSize="20sp" />
  122.  
  123. <Button
  124. android:id="@+id/buttonAdd"
  125. style="@style/Widget.AppCompat.Button.Borderless"
  126. android:layout_width="wrap_content"
  127. android:layout_height="wrap_content"
  128. android:layout_alignTop="@id/buttonEqual"
  129. android:layout_toRightOf="@id/buttonEqual"
  130. android:text="+"
  131. android:textSize="20sp" />
  132.  
  133. <Button
  134. android:id="@+id/buttonClear"
  135. style="@style/Widget.AppCompat.Button.Borderless"
  136. android:layout_width="wrap_content"
  137. android:layout_height="wrap_content"
  138. android:layout_alignRight="@id/buttonAdd"
  139. android:layout_below="@id/buttonAdd"
  140. android:layout_marginTop="@dimen/activity_vertical_margin"
  141. android:text="C"
  142. android:textSize="20sp" />
  143. </RelativeLayout>
  144. </layout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement