Advertisement
exsrafif

activity_detail

Dec 12th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.60 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=".Detail">
  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.  
  17.  
  18.        app:srcCompat="@drawable/icon"/>
  19.  
  20.     <RelativeLayout
  21.        android:layout_width="match_parent"
  22.        android:layout_height="wrap_content"
  23.        android:layout_below="@+id/iv_produk"
  24.        android:layout_marginTop="15dp"
  25.        android:paddingLeft="10dp"
  26.        android:paddingRight="10dp">
  27.  
  28.  
  29.     <RelativeLayout
  30.        android:layout_width="match_parent"
  31.        android:layout_height="wrap_content"
  32.        android:orientation="vertical"
  33.        android:id="@+id/layer1">
  34.  
  35.         <TextView
  36.            android:id="@+id/labelNama"
  37.            android:layout_width="wrap_content"
  38.            android:layout_height="wrap_content"
  39.            android:text="NAMA : "
  40.            android:textStyle="bold"
  41.            android:textSize="20dp"
  42.            android:layout_marginBottom="10dp"/>
  43.  
  44.         <TextView
  45.            android:id="@+id/Nama"
  46.            android:textStyle="bold"
  47.            android:textSize="20dp"
  48.            android:layout_toRightOf="@+id/labelNama"
  49.            android:layout_width="match_parent"
  50.            android:layout_height="wrap_content"
  51.            android:layout_marginBottom="10dp"/>
  52.  
  53.     </RelativeLayout>
  54.  
  55.     <RelativeLayout
  56.        android:layout_width="match_parent"
  57.        android:layout_height="wrap_content"
  58.        android:orientation="vertical"
  59.        android:id="@+id/layer2"
  60.        android:layout_below="@+id/layer1">
  61.  
  62.         <TextView
  63.            android:id="@+id/labelStok"
  64.            android:layout_width="wrap_content"
  65.            android:layout_height="wrap_content"
  66.            android:text="STOK : "
  67.            android:textStyle="bold"
  68.            android:textSize="20dp"
  69.            android:layout_marginBottom="10dp"/>
  70.  
  71.         <TextView
  72.            android:id="@+id/Stok"
  73.            android:textStyle="bold"
  74.            android:textSize="20dp"
  75.            android:layout_toRightOf="@+id/labelStok"
  76.            android:layout_width="match_parent"
  77.            android:layout_height="wrap_content"
  78.            android:layout_marginBottom="10dp"/>
  79.  
  80.     </RelativeLayout>
  81.  
  82.     <RelativeLayout
  83.        android:layout_width="match_parent"
  84.        android:layout_height="wrap_content"
  85.        android:orientation="vertical"
  86.        android:id="@+id/layer3"
  87.        android:layout_below="@+id/layer2">
  88.  
  89.         <TextView
  90.            android:id="@+id/labelHarga"
  91.            android:layout_width="wrap_content"
  92.            android:layout_height="wrap_content"
  93.            android:text="HARGA : "
  94.            android:textStyle="bold"
  95.            android:textSize="20dp"
  96.            android:layout_marginBottom="10dp"/>
  97.  
  98.         <TextView
  99.            android:id="@+id/Harga"
  100.            android:textStyle="bold"
  101.            android:textSize="20dp"
  102.            android:layout_toRightOf="@+id/labelHarga"
  103.            android:layout_width="match_parent"
  104.            android:layout_height="wrap_content"
  105.            android:layout_marginBottom="10dp"/>
  106.  
  107.     </RelativeLayout>
  108.  
  109.     </RelativeLayout>
  110.  
  111. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement