Advertisement
Ono007

simpleCalculator2LiniarLayout.xml

Oct 18th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 8.25 KB | None | 0 0
  1.  
  2.  
  3. <?xml version="1.0" encoding="utf-8"?>
  4. <LinearLayout
  5.     xmlns:android="http://schemas.android.com/apk/res/android"
  6.     android:orientation="vertical"
  7.     android:layout_width="match_parent"
  8.     android:layout_height="match_parent"
  9.     android:backgroundTint="@color/colorPrimaryDark">
  10.  
  11.     <LinearLayout
  12.         android:layout_width="match_parent"
  13.         android:layout_height="wrap_content"
  14.         android:orientation="vertical"
  15.         android:weightSum="2"
  16.         android:layout_marginTop="10dp"
  17.         android:padding="15dp">
  18.         <TextView
  19.             android:id="@+id/info"
  20.             android:layout_width="match_parent"
  21.             android:layout_height="wrap_content"
  22.             android:layout_marginTop="10dp"
  23.             android:background="#80bfff"
  24.             android:textColor="@color/colorAccent"
  25.             android:textSize="30sp" />
  26.  
  27.         <EditText
  28.             android:id="@+id/result"
  29.             android:layout_width="match_parent"
  30.             android:layout_height="wrap_content"
  31.             android:background="#80bfff"
  32.             android:textColor="@color/colorAccent"
  33.             android:textSize="60sp" />
  34.  
  35.  
  36.     </LinearLayout>
  37.  
  38.     <LinearLayout
  39.         android:layout_width="match_parent"
  40.         android:layout_height="wrap_content"
  41.         android:orientation="horizontal"
  42.         android:weightSum="4"
  43.         android:layout_marginTop="10dp"
  44.         android:layout_marginLeft="15dp"
  45.         android:layout_marginRight="15dp">
  46.         <Button
  47.             android:id="@+id/SEVEN"
  48.             android:layout_width="wrap_content"
  49.             android:layout_height="wrap_content"
  50.             android:backgroundTint="#2f70d8"
  51.             android:text="7"
  52.             android:textSize="30sp"
  53.             android:layout_weight="1"/>
  54.  
  55.         <Button
  56.             android:id="@+id/EIGHT"
  57.             android:layout_width="wrap_content"
  58.             android:layout_height="wrap_content"
  59.             android:backgroundTint="#2f70d8"
  60.             android:text="8"
  61.             android:textSize="30sp"
  62.             android:layout_weight="1"/>
  63.  
  64.         <Button
  65.             android:id="@+id/NINE"
  66.             android:layout_width="wrap_content"
  67.             android:layout_height="wrap_content"
  68.             android:backgroundTint="#2f70d8"
  69.             android:text="9"
  70.             android:textSize="30sp"
  71.             android:layout_weight="1"/>
  72.  
  73.         <Button
  74.             android:id="@+id/ADD"
  75.             android:layout_width="wrap_content"
  76.             android:layout_height="wrap_content"
  77.             android:backgroundTint="#2f70d8"
  78.             android:text="+"
  79.             android:textSize="30sp"
  80.             android:layout_weight="1"/>
  81.     </LinearLayout>
  82.  
  83.     <LinearLayout
  84.         android:layout_width="match_parent"
  85.         android:layout_height="wrap_content"
  86.         android:orientation="horizontal"
  87.         android:weightSum="4"
  88.         android:layout_marginTop="10dp"
  89.         android:layout_marginLeft="15dp"
  90.         android:layout_marginRight="15dp">
  91.         <Button
  92.             android:id="@+id/FOUR"
  93.             android:layout_width="wrap_content"
  94.             android:layout_height="wrap_content"
  95.             android:backgroundTint="#2f70d8"
  96.             android:text="4"
  97.             android:textSize="30sp"
  98.             android:layout_weight="1"/>
  99.  
  100.         <Button
  101.             android:id="@+id/FIVE"
  102.             android:layout_width="wrap_content"
  103.             android:layout_height="wrap_content"
  104.             android:backgroundTint="#2f70d8"
  105.             android:text="5"
  106.             android:textSize="30sp"
  107.             android:layout_weight="1"/>
  108.  
  109.         <Button
  110.             android:id="@+id/SIX"
  111.             android:layout_width="wrap_content"
  112.             android:layout_height="wrap_content"
  113.             android:backgroundTint="#2f70d8"
  114.             android:text="6"
  115.             android:textSize="30sp"
  116.             android:layout_weight="1"/>
  117.  
  118.         <Button
  119.             android:id="@+id/SUB"
  120.             android:layout_width="wrap_content"
  121.             android:layout_height="wrap_content"
  122.             android:backgroundTint="#2f70d8"
  123.             android:text="-"
  124.             android:textSize="30sp"
  125.             android:layout_weight="1"/>
  126.  
  127.     </LinearLayout>
  128.  
  129.     <LinearLayout
  130.         android:layout_width="match_parent"
  131.         android:layout_height="wrap_content"
  132.         android:orientation="horizontal"
  133.         android:weightSum="4"
  134.         android:layout_marginTop="10dp"
  135.         android:layout_marginLeft="15dp"
  136.         android:layout_marginRight="15dp">
  137.         <Button
  138.             android:id="@+id/ONE"
  139.             android:layout_width="wrap_content"
  140.             android:layout_height="wrap_content"
  141.             android:text="1"
  142.             android:backgroundTint="#2f70d8"
  143.             android:textSize="30sp"
  144.             android:layout_weight="1"/>
  145.  
  146.         <Button
  147.             android:id="@+id/TWO"
  148.             android:layout_width="wrap_content"
  149.             android:layout_height="wrap_content"
  150.             android:backgroundTint="#2f70d8"
  151.             android:text="2"
  152.             android:textSize="30sp"
  153.             android:layout_weight="1"/>
  154.  
  155.         <Button
  156.             android:id="@+id/THREE"
  157.             android:layout_width="wrap_content"
  158.             android:layout_height="wrap_content"
  159.             android:backgroundTint="#2f70d8"
  160.             android:text="3"
  161.             android:textSize="30sp"
  162.             android:layout_weight="1"/>
  163.  
  164.         <Button
  165.             android:id="@+id/MULTIPLY"
  166.             android:layout_width="wrap_content"
  167.             android:layout_height="wrap_content"
  168.             android:backgroundTint="#2f70d8"
  169.             android:text="*"
  170.             android:textSize="30sp"
  171.             android:layout_weight="1"/>
  172.  
  173.     </LinearLayout>
  174.  
  175.     <LinearLayout
  176.         android:layout_width="match_parent"
  177.         android:layout_height="wrap_content"
  178.         android:orientation="horizontal"
  179.         android:weightSum="4"
  180.         android:layout_marginTop="5dp"
  181.         android:layout_marginLeft="15dp"
  182.         android:layout_marginRight="15dp">
  183.         <Button
  184.             android:id="@+id/DOT"
  185.             android:layout_width="wrap_content"
  186.             android:layout_height="wrap_content"
  187.             android:backgroundTint="#2f70d8"
  188.             android:text="."
  189.             android:textSize="30sp"
  190.             android:layout_weight="1"/>
  191.  
  192.         <Button
  193.             android:id="@+id/ZERO"
  194.             android:layout_width="wrap_content"
  195.             android:layout_height="wrap_content"
  196.             android:backgroundTint="#2f70d8"
  197.             android:text="0"
  198.             android:textSize="30sp"
  199.             android:layout_weight="1"/>
  200.  
  201.         <Button
  202.             android:id="@+id/CLEAR"
  203.             android:layout_width="wrap_content"
  204.             android:layout_height="wrap_content"
  205.             android:backgroundTint="#2f70d8"
  206.             android:text="C"
  207.             android:textSize="30sp"
  208.             android:layout_weight="1"/>
  209.  
  210.         <Button
  211.             android:id="@+id/DIVISION"
  212.             android:layout_width="wrap_content"
  213.             android:layout_height="wrap_content"
  214.             android:backgroundTint="#2f70d8"
  215.             android:text="/"
  216.             android:textSize="30sp"
  217.             android:layout_weight="1"/>
  218.  
  219.     </LinearLayout>
  220.  
  221.     <LinearLayout
  222.         android:layout_width="match_parent"
  223.         android:layout_height="wrap_content"
  224.         android:orientation="horizontal"
  225.         android:weightSum="2"
  226.         android:layout_marginTop="5dp"
  227.         android:layout_marginLeft="15dp"
  228.         android:layout_marginRight="15dp">
  229.         <Button
  230.  
  231.             android:id="@+id/EQUAL"
  232.             android:layout_width="match_parent"
  233.             android:layout_height="wrap_content"
  234.             android:layout_weight="1"
  235.             android:backgroundTint="#2f70d8"
  236.             android:text="="
  237.             android:textSize="30sp" />
  238.  
  239.         <Button
  240.  
  241.             android:id="@+id/BACKSPACE"
  242.             android:layout_width="match_parent"
  243.             android:layout_height="wrap_content"
  244.             android:layout_weight="1"
  245.             android:backgroundTint="#2f70d8"
  246.             android:text="BKSP"
  247.             android:textSize="30sp" />
  248.     </LinearLayout>
  249.  
  250.  
  251. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement