Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- tools:context=".MainActivity"
- android:layout_weight="9"
- android:background="@color/colorPrimaryDark">
- <TextView
- android:id="@+id/Output2"
- android:layout_width="match_parent"
- android:layout_height="90dp"
- android:text=""
- android:textSize="35dp"
- android:gravity="bottom|right"
- android:layout_weight="1"
- android:background="@color/colordisplay"
- android:textColor="@color/colorAccent"
- />
- <TextView
- android:id="@+id/Output"
- android:layout_width="match_parent"
- android:layout_height="100dp"
- android:text=""
- android:textSize="40dp"
- android:gravity="bottom|right"
- android:layout_weight="1"
- android:background="@color/colordisplay"
- android:textColor="@color/colorAccent"
- />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:weightSum="5"
- android:layout_weight="1">
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="√"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="squr"
- ></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="X²"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="power"
- ></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="X!"
- android:textSize="20dp"
- android:onClick="facto"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="log"
- android:textSize="20dp"
- android:onClick="logf"
- android:textAllCaps="false"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="ln"
- android:textSize="20dp"
- android:onClick="lnf"
- android:textAllCaps="false"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:weightSum="5"
- android:layout_weight="1">
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="nPr"
- android:textAllCaps="false"
- android:onClick="nprf"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="nCr"
- android:onClick="ncr1"
- android:textAllCaps="false"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="sin"
- android:textAllCaps="false"
- android:onClick="sinf"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="cos"
- android:textAllCaps="false"
- android:onClick="cosf"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="tan"
- android:onClick="tanf"
- android:textAllCaps="false"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:weightSum="5"
- android:layout_weight="1">
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="π"
- android:textSize="20dp"
- android:onClick="pi1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="e"
- android:textAllCaps="false"
- android:textSize="20dp"
- android:onClick="expression"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="("
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="fb1"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text=")"
- android:onClick="fb2"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="%"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="percent"></Button>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:weightSum="5"
- android:layout_weight="1"
- >
- <Button
- android:id="@+id/seven"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="7"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="numseven"
- ></Button>
- <Button
- android:id="@+id/eight"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="8"
- android:textSize="20dp"
- android:onClick="numeight"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- ></Button>
- <Button
- android:id="@+id/nine"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="9"
- android:textSize="20dp"
- android:layout_weight="1"
- android:onClick="numnine"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- ></Button>
- <Button
- android:id="@+id/del"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="DEL"
- android:background="@drawable/acb"
- android:textSize="20dp"
- android:onClick="Del"></Button>
- <Button
- android:id="@+id/AC"
- android:background="@drawable/acb"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="AC"
- android:textSize="20dp"
- android:onClick="AC"></Button>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:weightSum="5"
- android:layout_weight="1">
- <Button
- android:id="@+id/four"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="4"
- android:textSize="20dp"
- android:onClick="numfour"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:id="@+id/five"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:text="5"
- android:onClick="numfive"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:id="@+id/six"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:onClick="numsix"
- android:text="6"
- android:textSize="20dp"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"></Button>
- <Button
- android:id="@+id/multi"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="X"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="nummulti"
- ></Button>
- <Button
- android:id="@+id/div"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="÷"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="numdiv"
- ></Button>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:weightSum="5"
- android:layout_weight="1"
- >
- <Button
- android:id="@+id/one"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="1"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="numone"
- ></Button>
- <Button
- android:id="@+id/two"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="2"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="numtwo"
- ></Button>
- <Button
- android:id="@+id/three"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="3"
- android:textSize="20dp"
- android:onClick="numthree"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- ></Button>
- <Button
- android:id="@+id/plus"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="+"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="numplus"
- ></Button>
- <Button
- android:id="@+id/minus"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="-"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="numminus"
- ></Button>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:weightSum="3"
- android:layout_weight="1">
- <Button
- android:id="@+id/zero"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="0"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:onClick="numzero"
- ></Button>
- <Button
- android:id="@+id/dots"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="."
- android:onClick="numdot"
- android:textSize="20dp"
- android:layout_weight="1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- ></Button>
- <Button
- android:id="@+id/equal1"
- android:background="@drawable/buttondi"
- android:textColor="@color/colorAccent"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="="
- android:textSize="20dp"
- android:onClick="numequal"
- android:layout_weight="1"
- ></Button>
- </LinearLayout>
- </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement