Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <layout>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/activity_main"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingBottom="@dimen/activity_vertical_margin"
- android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:paddingTop="@dimen/activity_vertical_margin"
- tools:context="com.sample.foo.samplecalculator.MainActivity">
- <TextView
- android:id="@+id/infoTextView"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="30dp"
- android:textSize="30sp" />
- <EditText
- android:id="@+id/editText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/infoTextView"
- android:enabled="false"
- android:gravity="bottom"
- android:lines="2"
- android:maxLines="2"
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonSeven"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/editText"
- android:text="7"
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonEight"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/editText"
- android:layout_toRightOf="@id/buttonSeven"
- android:text="8"
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonNine"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/editText"
- android:layout_toRightOf="@id/buttonEight"
- android:text="9"
- android:textSize="20sp" />
- ...
- ...
- <Button
- android:id="@+id/buttonDot"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/buttonOne"
- android:text="."
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonZero"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignRight="@id/buttonEight"
- android:layout_below="@id/buttonTwo"
- android:text="0"
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonEqual"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignRight="@id/buttonNine"
- android:layout_below="@id/buttonThree"
- android:text="="
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonDivide"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignTop="@id/buttonNine"
- android:layout_toRightOf="@id/buttonNine"
- android:text="/"
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonMultiply"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignTop="@id/buttonSix"
- android:layout_toRightOf="@id/buttonSix"
- android:text="*"
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonSubtract"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignTop="@id/buttonThree"
- android:layout_toRightOf="@id/buttonThree"
- android:text="-"
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonAdd"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignTop="@id/buttonEqual"
- android:layout_toRightOf="@id/buttonEqual"
- android:text="+"
- android:textSize="20sp" />
- <Button
- android:id="@+id/buttonClear"
- style="@style/Widget.AppCompat.Button.Borderless"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignRight="@id/buttonAdd"
- android:layout_below="@id/buttonAdd"
- android:layout_marginTop="@dimen/activity_vertical_margin"
- android:text="C"
- android:textSize="20sp" />
- </RelativeLayout>
- </layout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement