Advertisement
benites

Layout.xml

Jan 6th, 2019
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.49 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    style="@style/tema"
  4.    android:layout_width="match_parent"
  5.    android:layout_height="match_parent"
  6.    android:orientation="vertical">
  7.  
  8.     <RelativeLayout
  9.        android:layout_width="match_parent"
  10.        android:layout_height="0dp"
  11.        android:layout_weight="0.3"
  12.        android:orientation="vertical">
  13.  
  14.         <LinearLayout
  15.            android:layout_width="wrap_content"
  16.            android:layout_height="wrap_content"
  17.            android:layout_centerHorizontal="true"
  18.            android:layout_centerVertical="true"
  19.            android:orientation="vertical">
  20.  
  21.             <TextView
  22.                android:id="@+id/visor"
  23.                style="@style/visor"
  24.                android:layout_width="match_parent"
  25.                android:layout_height="wrap_content"
  26.                android:gravity="center" />
  27.  
  28.             <TextView
  29.                android:id="@+id/visorPrincipal"
  30.                style="@style/visorPrincipal"
  31.                android:layout_width="match_parent"
  32.                android:layout_height="wrap_content"
  33.                android:gravity="center" />
  34.         </LinearLayout>
  35.  
  36.     </RelativeLayout>
  37.  
  38.     <LinearLayout
  39.        android:layout_width="match_parent"
  40.        android:layout_height="0dp"
  41.        android:layout_weight="0.14"
  42.        android:orientation="horizontal">
  43.  
  44.         <Button
  45.            style="@style/botaoDestaque"
  46.            android:layout_width="0dp"
  47.            android:layout_height="match_parent"
  48.            android:layout_weight="0.25"
  49.            android:onClick="handleButtonLimpar"
  50.            android:text="C" />
  51.  
  52.         <ImageButton
  53.            style="@style/botaoDestaque"
  54.            android:layout_width="0dp"
  55.            android:layout_height="match_parent"
  56.            android:layout_weight="0.25"
  57.            android:onClick="handleButtonDesfazer"
  58.            android:src="@mipmap/ic_launcher_foreground"
  59.            android:adjustViewBounds="true"
  60.            android:padding="24dp"
  61.            android:scaleType="fitCenter" />
  62.  
  63.         <Button
  64.            style="@style/botaoDestaque"
  65.            android:layout_width="0dp"
  66.            android:layout_height="match_parent"
  67.            android:layout_weight="0.25"
  68.            android:onClick="handleButtonPorcentagem"
  69.            android:text="%" />
  70.  
  71.         <Button
  72.            style="@style/botaoDestaque"
  73.            android:layout_width="0dp"
  74.            android:layout_height="match_parent"
  75.            android:layout_weight="0.25"
  76.            android:onClick="handleButtonDivide"
  77.            android:text="÷" />
  78.     </LinearLayout>
  79.  
  80.     <LinearLayout
  81.        android:layout_width="match_parent"
  82.        android:layout_height="0dp"
  83.        android:layout_weight="0.14"
  84.        android:orientation="horizontal">
  85.  
  86.         <Button
  87.            style="@style/botao"
  88.            android:layout_width="0dp"
  89.            android:layout_height="match_parent"
  90.            android:layout_weight="0.25"
  91.            android:onClick="handleButtonSete"
  92.            android:text="7" />
  93.  
  94.         <Button
  95.            style="@style/botao"
  96.            android:layout_width="0dp"
  97.            android:layout_height="match_parent"
  98.            android:layout_weight="0.25"
  99.            android:onClick="handleButtonOito"
  100.            android:text="8" />
  101.  
  102.         <Button
  103.            style="@style/botao"
  104.            android:layout_width="0dp"
  105.            android:layout_height="match_parent"
  106.            android:layout_weight="0.25"
  107.            android:onClick="handleButtonNove"
  108.            android:text="9" />
  109.  
  110.         <Button
  111.            style="@style/botaoDestaque"
  112.            android:layout_width="0dp"
  113.            android:layout_height="match_parent"
  114.            android:layout_weight="0.25"
  115.            android:onClick="handleButtonMultiplica"
  116.            android:text="×" />
  117.     </LinearLayout>
  118.  
  119.     <LinearLayout
  120.        android:layout_width="match_parent"
  121.        android:layout_height="0dp"
  122.        android:layout_weight="0.14"
  123.        android:orientation="horizontal">
  124.  
  125.         <Button
  126.            style="@style/botao"
  127.            android:layout_width="0dp"
  128.            android:layout_height="match_parent"
  129.            android:layout_weight="0.25"
  130.            android:onClick="handleButtonQuatro"
  131.            android:text="4" />
  132.  
  133.         <Button
  134.            style="@style/botao"
  135.            android:layout_width="0dp"
  136.            android:layout_height="match_parent"
  137.            android:layout_weight="0.25"
  138.            android:onClick="handleButtonCinco"
  139.            android:text="5" />
  140.  
  141.         <Button
  142.            style="@style/botao"
  143.            android:layout_width="0dp"
  144.            android:layout_height="match_parent"
  145.            android:layout_weight="0.25"
  146.            android:onClick="handleButtonSeis"
  147.            android:text="6" />
  148.  
  149.         <Button
  150.            style="@style/botaoDestaque"
  151.            android:layout_width="0dp"
  152.            android:layout_height="match_parent"
  153.            android:layout_weight="0.25"
  154.            android:onClick="handleButtonSubtrai"
  155.            android:text="-" />
  156.     </LinearLayout>
  157.  
  158.     <LinearLayout
  159.        android:layout_width="match_parent"
  160.        android:layout_height="0dp"
  161.        android:layout_weight="0.14"
  162.        android:orientation="horizontal">
  163.  
  164.         <Button
  165.            style="@style/botao"
  166.            android:layout_width="0dp"
  167.            android:layout_height="match_parent"
  168.            android:layout_weight="0.25"
  169.            android:onClick="handleButtonUm"
  170.            android:text="1" />
  171.  
  172.         <Button
  173.            style="@style/botao"
  174.            android:layout_width="0dp"
  175.            android:layout_height="match_parent"
  176.            android:layout_weight="0.25"
  177.            android:onClick="handleButtonDois"
  178.            android:text="2" />
  179.  
  180.         <Button
  181.            style="@style/botao"
  182.            android:layout_width="0dp"
  183.            android:layout_height="match_parent"
  184.            android:layout_weight="0.25"
  185.            android:onClick="handleButtonTres"
  186.            android:text="3" />
  187.  
  188.         <Button
  189.            style="@style/botaoDestaque"
  190.            android:layout_width="0dp"
  191.            android:layout_height="match_parent"
  192.            android:layout_weight="0.25"
  193.            android:onClick="handleButtonSoma"
  194.            android:text="+" />
  195.     </LinearLayout>
  196.  
  197.     <LinearLayout
  198.        android:layout_width="match_parent"
  199.        android:layout_height="0dp"
  200.        android:layout_weight="0.14"
  201.        android:orientation="horizontal">
  202.  
  203.         <Button
  204.            style="@style/botao"
  205.            android:layout_width="0dp"
  206.            android:layout_height="match_parent"
  207.            android:layout_weight="0.15"
  208.            android:onClick="handleButtonZero"
  209.            android:text="0" />
  210.  
  211.         <Button
  212.            style="@style/botao"
  213.            android:layout_width="0dp"
  214.            android:layout_height="match_parent"
  215.            android:layout_weight="0.15"
  216.            android:onClick="handleButtonVirgula"
  217.            android:text="," />
  218.  
  219.         <Button
  220.            style="@style/botaoDestaque"
  221.            android:layout_width="@dimen/default_margin_duo"
  222.            android:layout_height="match_parent"
  223.            android:layout_weight="0.30"
  224.            android:onClick="handleButtonResultado"
  225.            android:text="=" />
  226.  
  227.     </LinearLayout>
  228.  
  229. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement