rifki_cs29

fragment_home

Oct 24th, 2020 (edited)
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.28 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout
  3.    xmlns:android="http://schemas.android.com/apk/res/android"
  4.    xmlns:app="http://schemas.android.com/apk/res-auto"
  5.    xmlns:tools="http://schemas.android.com/tools"
  6.    android:layout_width="match_parent"
  7.    android:layout_height="match_parent"
  8.    android:background="@color/colorPrimaryDark"
  9.    tools:context=".view.fragment.HomeFragment">
  10.  
  11.  
  12.     <View
  13.        android:layout_width="match_parent"
  14.        android:layout_height="230dp"
  15.        android:id="@+id/bg_top_header"
  16.        app:layout_constraintHorizontal_bias="0.0"
  17.        app:layout_constraintStart_toStartOf="parent"
  18.        app:layout_constraintTop_toTopOf="parent"
  19.        android:background="@drawable/ic_bg_topheader"/>
  20.  
  21.     <ImageView
  22.        android:id="@+id/user_photo"
  23.        android:layout_width="71dp"
  24.        android:layout_height="71dp"
  25.        android:layout_marginStart="26dp"
  26.        android:layout_marginTop="24dp"
  27.        android:src="@drawable/ic_baseline_account_circle_24"
  28.        app:layout_constraintStart_toStartOf="parent"
  29.        app:layout_constraintTop_toTopOf="parent"
  30.        android:contentDescription="@string/login_username_hint" />
  31.  
  32.     <TextView
  33.        android:id="@+id/user_name"
  34.        android:textSize="20sp"
  35.        android:text="@string/nama_karyawan"
  36.        android:textColor="#ffffff"
  37.        android:fontFamily="@font/montserrat_bold"
  38.        android:layout_marginTop="32dp"
  39.        android:layout_marginStart="18dp"
  40.        android:layout_width="wrap_content"
  41.        android:layout_height="wrap_content"
  42.        app:layout_constraintStart_toEndOf="@id/user_photo"
  43.        app:layout_constraintTop_toTopOf="parent"/>
  44.  
  45.     <TextView
  46.        android:textSize="16sp"
  47.        android:text="@string/npk"
  48.        android:id="@+id/user_id"
  49.        android:fontFamily="@font/montserrat_light"
  50.        android:textColor="#ffffff"
  51.        android:layout_marginTop="32dp"
  52.        android:layout_marginStart="18dp"
  53.        android:layout_width="wrap_content"
  54.        android:layout_height="wrap_content"
  55.        app:layout_constraintStart_toEndOf="@id/user_photo"
  56.        app:layout_constraintTop_toTopOf="@id/user_name"/>
  57.  
  58.  
  59.     <GridLayout
  60.        android:layout_width="match_parent"
  61.        android:layout_height="300dp"
  62.        android:layout_marginTop="140dp"
  63.        android:layout_marginBottom="60dp"
  64.        android:alignmentMode="alignMargins"
  65.        android:columnCount="1"
  66.        android:columnOrderPreserved="false"
  67.        android:padding="14dp"
  68.        app:layout_constraintBottom_toBottomOf="parent"
  69.        app:layout_constraintTop_toTopOf="@id/bg_top_header"
  70.        app:layout_constraintVertical_bias="0.0"
  71.        app:layout_editor_absoluteX="0dp">
  72.  
  73.         <androidx.cardview.widget.CardView
  74.            android:layout_width="match_parent"
  75.            android:layout_height="10dp"
  76.            android:layout_rowWeight="1"
  77.            android:layout_columnWeight="1"
  78.            android:layout_marginLeft="16dp"
  79.            android:layout_marginRight="16dp"
  80.            android:layout_marginBottom="16dp"
  81.            android:background="@color/cardColor"
  82.            app:cardCornerRadius="8dp"
  83.            app:cardElevation="6dp">
  84.  
  85.             <LinearLayout
  86.                android:layout_width="wrap_content"
  87.                android:layout_height="wrap_content"
  88.                android:layout_gravity="center_horizontal|center_vertical"
  89.                android:layout_margin="16dp"
  90.                android:gravity="center"
  91.                android:orientation="vertical">
  92.  
  93.                 <ImageView
  94.                    android:layout_width="wrap_content"
  95.                    android:layout_height="wrap_content"
  96.                    android:layout_gravity="center_horizontal"
  97.                    android:background="@drawable/ic_baseline_people_blue"
  98.                    android:contentDescription="@string/nama_karyawan" />
  99.  
  100.                 <TextView
  101.                    android:layout_width="wrap_content"
  102.                    android:layout_height="wrap_content"
  103.                    android:text="@string/bawahan_title"
  104.                    android:layout_marginTop="8dp"
  105.                    android:fontFamily="@font/montserrat_medium"
  106.                    android:textColor="@color/colorPrimary"
  107.                    android:textSize="12sp"
  108.                    android:textStyle="bold"/>
  109.  
  110.             </LinearLayout>
  111.         </androidx.cardview.widget.CardView>
  112.  
  113.         <androidx.cardview.widget.CardView
  114.            android:layout_width="match_parent"
  115.            android:layout_height="10dp"
  116.            android:layout_rowWeight="1"
  117.            android:layout_columnWeight="1"
  118.            android:layout_marginLeft="16dp"
  119.            android:layout_marginRight="16dp"
  120.            android:layout_marginBottom="16dp"
  121.            android:background="@color/cardColor"
  122.            app:cardCornerRadius="8dp"
  123.            app:cardElevation="6dp">
  124.  
  125.             <LinearLayout
  126.                android:layout_width="wrap_content"
  127.                android:layout_height="wrap_content"
  128.                android:layout_gravity="center_horizontal|center_vertical"
  129.                android:layout_margin="16dp"
  130.                android:gravity="center"
  131.                android:orientation="vertical">
  132.  
  133.                 <ImageView
  134.                    android:layout_width="wrap_content"
  135.                    android:layout_height="wrap_content"
  136.                    android:layout_gravity="center_horizontal"
  137.                    android:background="@drawable/ic_baseline_library_books_blue"
  138.                    android:contentDescription="@string/pengajuan_title" />
  139.  
  140.                 <TextView
  141.                    android:layout_width="wrap_content"
  142.                    android:layout_height="wrap_content"
  143.                    android:text="@string/pengajuan_title"
  144.                    android:layout_marginTop="8dp"
  145.                    android:fontFamily="@font/montserrat_medium"
  146.                    android:textColor="@color/colorPrimary"
  147.                    android:textSize="12sp"
  148.                    android:textStyle="bold"/>
  149.             </LinearLayout>
  150.         </androidx.cardview.widget.CardView>
  151.  
  152.  
  153.     </GridLayout>
  154. </androidx.constraintlayout.widget.ConstraintLayout>
Add Comment
Please, Sign In to add comment