Skip to content

Instantly share code, notes, and snippets.

@iamnaran
Created October 26, 2022 15:53
Show Gist options
  • Save iamnaran/d08cea6ef99b681ddcd43de741d71acd to your computer and use it in GitHub Desktop.
Save iamnaran/d08cea6ef99b681ddcd43de741d71acd to your computer and use it in GitHub Desktop.
Layout of Upload Documents
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Identification Document -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:fontFamily="@font/normal"
android:includeFontPadding="false"
android:padding="8dp"
android:text="@string/documents"
android:textColor="@color/colorSecondaryText"
android:textSize="12sp"
app:drawableEndCompat="@drawable/ic_required_status"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="5dp"
android:layout_marginBottom="5dp"
app:cardBackgroundColor="@color/colorLightGrey"
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:cardPreventCornerOverlap="false"
app:cardUseCompatPadding="true"
app:contentPadding="10dp">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="none">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center|start"
android:orientation="horizontal">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/add_document"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:background="@drawable/background_dotted_light"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/add_from_photos"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_margin="5dp"
android:layout_weight="1"
android:minWidth="50dp"
android:padding="8dp"
android:src="@drawable/ic_baseline_add_photo_alternate_24"
app:tint="@color/colorAppBlue" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/add_from_camera"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_margin="5dp"
android:layout_weight="1"
android:minWidth="50dp"
android:padding="8dp"
android:src="@drawable/ic_baseline_camera_alt_24"
app:tint="@color/colorAppBlue" />
</androidx.appcompat.widget.LinearLayoutCompat>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/document_rv"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:nestedScrollingEnabled="true"
android:padding="5dp" />
</RelativeLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</HorizontalScrollView>
</androidx.cardview.widget.CardView>
</LinearLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</ScrollView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment