Advertisement
exsrafif

activity_main_produk

Dec 12th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.64 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:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    android:background="@drawable/background4"
  8.    tools:context=".MainProduk">
  9.  
  10.     <ImageView
  11.        android:id="@+id/iv_produk"
  12.        android:layout_width="200dp"
  13.        android:layout_height="200dp"
  14.        android:layout_marginTop="30dp"
  15.        android:layout_centerHorizontal="true"
  16.        app:srcCompat="@drawable/icon"/>
  17.  
  18.     <RelativeLayout
  19.        android:layout_width="match_parent"
  20.        android:layout_height="wrap_content"
  21.        android:layout_below="@+id/iv_produk"
  22.        android:id="@+id/layer1"
  23.        android:layout_marginTop="10dp">
  24.  
  25.         <EditText
  26.            android:id="@+id/InputNama"
  27.            android:layout_width="315dp"
  28.            android:layout_height="50dp"
  29.            android:layout_centerHorizontal="true"
  30.            android:background="@android:color/transparent"
  31.            android:hint="Masukkan Nama Barang"
  32.            android:textColorHint="@android:color/black" />
  33.  
  34.         <EditText
  35.            android:id="@+id/InputHarga"
  36.            android:layout_below="@+id/InputNama"
  37.            android:layout_width="315dp"
  38.            android:layout_height="50dp"
  39.            android:layout_marginTop="10dp"
  40.            android:layout_centerHorizontal="true"
  41.            android:background="@android:color/transparent"
  42.            android:hint="Masukkan Harga"
  43.            android:textColorHint="@android:color/black" />
  44.  
  45.         <EditText
  46.            android:id="@+id/InputStok"
  47.            android:layout_below="@id/InputHarga"
  48.            android:layout_width="315dp"
  49.            android:layout_height="50dp"
  50.            android:layout_centerHorizontal="true"
  51.            android:layout_marginTop="10dp"
  52.            android:background="@android:color/transparent"
  53.            android:hint="Masukkan Jumlah"
  54.            android:textColorHint="@android:color/black" />
  55.  
  56.     </RelativeLayout>
  57.  
  58.     <LinearLayout
  59.        android:id="@+id/layer2"
  60.        android:layout_width="match_parent"
  61.        android:layout_height="wrap_content"
  62.        android:layout_below="@+id/layer1"
  63.        android:orientation="horizontal"
  64.        android:layout_marginTop="25dp"
  65.        android:weightSum="2">
  66.  
  67.         <Button
  68.            android:id="@+id/simpan"
  69.            android:layout_width="match_parent"
  70.            android:layout_height="50dp"
  71.            android:layout_centerVertical="true"
  72.            android:layout_gravity="center"
  73.            android:layout_marginLeft="20dp"
  74.            android:layout_marginRight="5dp"
  75.            android:layout_weight="1"
  76.            android:background="@color/colorAccent"
  77.            android:text="SIMPAN"
  78.            android:textColor="@color/colorWhite"
  79.            android:textSize="20dp"
  80.            android:textStyle="bold" />
  81.  
  82.         <Button
  83.            android:id="@+id/batal"
  84.            android:layout_width="match_parent"
  85.            android:layout_height="50dp"
  86.            android:layout_centerVertical="true"
  87.            android:layout_gravity="center"
  88.            android:layout_marginLeft="5dp"
  89.            android:layout_marginRight="20dp"
  90.            android:layout_weight="1"
  91.            android:background="@color/colorAccent"
  92.            android:text="BATAL"
  93.            android:textColor="@color/colorWhite"
  94.            android:textSize="20dp"
  95.            android:textStyle="bold" />
  96.  
  97.     </LinearLayout>
  98.  
  99. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement