Facebook
From asd, 1 Month ago, written in XML.
Embed
Download Paste or View Raw
Hits: 121
  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:id="@+id/main"
  7.     android:layout_width="match_parent"
  8.     android:layout_height="match_parent"
  9.     android:background="#e8e8f9"
  10.      tools:c>
  11.  
  12.     <!-- Top Fixed Images -->
  13.     <ImageView
  14.         android:id="@+id/imageView2"
  15.         android:layout_width="0dp"
  16.         android:layout_height="0dp"
  17.          app:layout_c
  18.          app:layout_c
  19.          app:layout_c
  20.          app:layout_c
  21.         app:srcCompat="@drawable/top_background_gradle" />
  22.  
  23.     <ImageView
  24.         android:id="@+id/imageView"
  25.         android:layout_width="wrap_content"
  26.         android:layout_height="wrap_content"
  27.          app:layout_c
  28.          app:layout_c
  29.          app:layout_c
  30.         app:srcCompat="@drawable/top_background" />
  31.  
  32.     <!-- Scrollable Content Starting from a Bit Lower Position in the Top Image -->
  33.     <ScrollView
  34.         android:layout_width="match_parent"
  35.         android:layout_height="0dp"
  36.          app:layout_c
  37.          app:layout_c
  38.         android:layout_marginTop="150dp"> <!-- Adjusted this value to control the start position within the image -->
  39.  
  40.         <LinearLayout
  41.             android:layout_width="match_parent"
  42.             android:layout_height="wrap_content"
  43.              android:elevati
  44.              android:orientati
  45.             android:paddingStart="14dp"
  46.             android:paddingEnd="14dp"
  47.             android:paddingBottom="16dp">
  48.  
  49.             <!-- Purple Box Example - Repeat this block for each purple box -->
  50.             <LinearLayout
  51.                 android:id="@+id/linearLayoutButton"
  52.                 android:layout_width="match_parent"
  53.                 android:layout_height="wrap_content"
  54.                 android:layout_marginTop="16dp"
  55.                 android:background="@drawable/ripple_white_box"
  56.                 android:clickable="true"
  57.                  android:elevati
  58.                 android:focusable="true"
  59.                  android:
  60.                  android:orientati>
  61.  
  62.                 <LinearLayout
  63.                     android:layout_width="match_parent"
  64.                     android:layout_height="match_parent"
  65.                     android:layout_margin="10dp"
  66.                     android:background="@drawable/purple_top_button"
  67.                      android:elevati
  68.                      android:orientati>
  69.  
  70.                     <ImageView
  71.                         android:id="@+id/imageView3"
  72.                         android:layout_width="match_parent"
  73.                         android:layout_height="wrap_content"
  74.                         android:layout_margin="10dp"
  75.                         app:srcCompat="@drawable/video_call" />
  76.  
  77.                     <TextView
  78.                         android:id="@+id/textView"
  79.                         android:layout_width="match_parent"
  80.                         android:layout_height="wrap_content"
  81.                         android:layout_marginBottom="8dp"
  82.                         android:gravity="center"
  83.                         android:text="test"
  84.                         android:textSize="24sp" />
  85.                 </LinearLayout>
  86.  
  87.             </LinearLayout>
  88.             <!-- Purple Box Example Ends -->
  89.  
  90.         </LinearLayout>
  91. </ScrollView>
  92.  
  93.     </androidx.constraintlayout.widget.ConstraintLayout>
  94.