Advertisement
ridjis

activity_main.xml

Dec 9th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.39 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:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
  4.    android:layout_height="match_parent" tools:context=".MainActivity">
  5.  
  6.  
  7.     <GridLayout
  8.        android:columnCount="4"
  9.        android:rowCount="9"
  10.        android:layout_marginTop="200dp"
  11.        android:layout_width="match_parent"
  12.        android:layout_height="match_parent"
  13.        android:layout_alignParentTop="true"
  14.        android:layout_alignParentLeft="true"
  15.        android:layout_alignParentStart="true">
  16.  
  17.  
  18.         <Button
  19.            android:layout_rowWeight="1"
  20.            android:layout_columnSpan="2"
  21.            android:layout_columnWeight="1"
  22.            android:layout_width="wrap_content"
  23.            android:layout_height="wrap_content"
  24.            android:text="C"
  25.            android:id="@+id/clear"
  26.            android:layout_row="0"
  27.            android:layout_column="0" />
  28.  
  29.         <Button
  30.            android:layout_rowWeight="1"
  31.            android:layout_columnSpan="2"
  32.            android:layout_columnWeight="1"
  33.            android:layout_width="wrap_content"
  34.            android:layout_height="wrap_content"
  35.            android:text="="
  36.            android:id="@+id/jednako"
  37.            android:layout_row="0"
  38.            android:layout_column="2" />
  39.  
  40.         <Button
  41.            android:layout_rowWeight="1"
  42.            android:layout_columnWeight="1"
  43.            android:layout_width="wrap_content"
  44.            android:layout_height="wrap_content"
  45.            android:text="1"
  46.            android:layout_row="1"
  47.            android:layout_column="0"
  48.            android:id="@+id/jedan" />
  49.         <Button
  50.            android:layout_rowWeight="1"
  51.            android:layout_columnWeight="1"
  52.            android:layout_width="wrap_content"
  53.            android:layout_height="wrap_content"
  54.            android:text="2"
  55.            android:layout_row="1"
  56.            android:layout_column="1"
  57.            android:id="@+id/dva" />
  58.         <Button
  59.            android:layout_rowWeight="1"
  60.            android:layout_columnWeight="1"
  61.            android:layout_width="wrap_content"
  62.            android:layout_height="wrap_content"
  63.            android:text="3"
  64.            android:layout_row="1"
  65.            android:layout_column="2"
  66.            android:id="@+id/tri" />
  67.         <Button
  68.            android:layout_rowWeight="1"
  69.            android:layout_columnWeight="1"
  70.            android:layout_width="wrap_content"
  71.            android:layout_height="wrap_content"
  72.            android:text="+"
  73.            android:layout_row="1"
  74.            android:layout_column="3"
  75.            android:id="@+id/plus" />
  76.         <Button
  77.            android:layout_rowWeight="1"
  78.            android:layout_columnWeight="1"
  79.            android:layout_width="wrap_content"
  80.            android:layout_height="wrap_content"
  81.            android:text="4"
  82.            android:layout_row="2"
  83.            android:layout_column="0"
  84.            android:id="@+id/cetiri" />
  85.         <Button
  86.            android:layout_rowWeight="1"
  87.            android:layout_columnWeight="1"
  88.            android:layout_width="wrap_content"
  89.            android:layout_height="wrap_content"
  90.            android:text="5"
  91.            android:layout_row="2"
  92.            android:layout_column="1"
  93.            android:id="@+id/pet" />
  94.         <Button
  95.            android:layout_rowWeight="1"
  96.            android:layout_columnWeight="1"
  97.            android:layout_width="wrap_content"
  98.            android:layout_height="wrap_content"
  99.            android:text="6"
  100.            android:layout_row="2"
  101.            android:layout_column="2"
  102.            android:id="@+id/sest" />
  103.         <Button
  104.            android:layout_rowWeight="1"
  105.            android:layout_columnWeight="1"
  106.            android:layout_width="wrap_content"
  107.            android:layout_height="wrap_content"
  108.            android:text="-"
  109.            android:layout_row="2"
  110.            android:layout_column="3"
  111.            android:id="@+id/minus" />
  112.         <Button
  113.            android:layout_rowWeight="1"
  114.            android:layout_columnWeight="1"
  115.            android:layout_width="wrap_content"
  116.            android:layout_height="wrap_content"
  117.            android:text="7"
  118.            android:layout_row="3"
  119.            android:layout_column="0"
  120.            android:id="@+id/sedam" />
  121.         <Button
  122.            android:layout_rowWeight="1"
  123.            android:layout_columnWeight="1"
  124.            android:layout_width="wrap_content"
  125.            android:layout_height="wrap_content"
  126.            android:text="8"
  127.            android:layout_row="3"
  128.            android:layout_column="1"
  129.            android:id="@+id/osam" />
  130.         <Button
  131.            android:layout_rowWeight="1"
  132.            android:layout_columnWeight="1"
  133.            android:layout_width="wrap_content"
  134.            android:layout_height="wrap_content"
  135.            android:text="9"
  136.            android:layout_row="3"
  137.            android:layout_column="2"
  138.            android:id="@+id/devet" />
  139.         <Button
  140.            android:layout_rowWeight="1"
  141.            android:layout_columnWeight="1"
  142.            android:layout_width="wrap_content"
  143.            android:layout_height="wrap_content"
  144.            android:text="*"
  145.            android:layout_row="3"
  146.            android:layout_column="3"
  147.            android:id="@+id/puta" />
  148.         <Button
  149.            android:layout_rowWeight="1"
  150.            android:layout_columnWeight="1"
  151.            android:layout_width="wrap_content"
  152.            android:layout_height="wrap_content"
  153.            android:text="0"
  154.            android:layout_row="4"
  155.            android:layout_column="1"
  156.            android:id="@+id/nula" />
  157.         <Button
  158.            android:layout_rowWeight="1"
  159.            android:layout_columnWeight="1"
  160.            android:layout_width="wrap_content"
  161.            android:layout_height="wrap_content"
  162.            android:text="/"
  163.            android:layout_row="4"
  164.            android:layout_column="3"
  165.            android:id="@+id/podijeljeno" />
  166.     </GridLayout>
  167.  
  168.     <EditText
  169.        android:layout_marginTop="100dp"
  170.        android:layout_width="match_parent"
  171.        android:layout_height="100dp"
  172.        android:id="@+id/editText"
  173.        android:textSize="50sp"/>
  174. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement