[xml] XML

Viewer

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout 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:orientation="vertical"
  8.     tools:context=".MainActivity">
  9.     <androidx.cardview.widget.CardView
  10.         android:layout_width="match_parent"
  11.         android:layout_marginLeft="16dp"
  12.         android:layout_marginRight="16dp"
  13.         android:layout_marginTop="16dp"
  14.         android:layout_height="wrap_content"
  15.         app:cardCornerRadius="20dp"
  16.         app:cardBackgroundColor="#D3D3D3"
  17.         >
  18.  
  19.     <LinearLayout
  20.         android:layout_width="match_parent"
  21.         android:layout_height="wrap_content"
  22.         android:layout_marginTop="2dp"
  23.         android:layout_marginBottom="2dp"
  24.         android:orientation="horizontal">
  25.  
  26.  
  27.         <androidx.cardview.widget.CardView
  28.             android:layout_width="180dp"
  29.             android:layout_marginLeft="8dp"
  30.             android:layout_height="54dp"
  31.             app:cardBackgroundColor="#e75480"
  32.             android:layout_marginRight="8dp"
  33.             app:cardCornerRadius="20dp">
  34.  
  35.            <TextView
  36.                android:layout_width="match_parent"
  37.                android:layout_height="match_parent"
  38.                android:gravity="center"
  39.                android:textSize="20sp"
  40.                android:textColor="#FFF"
  41.                android:text="Categories" />
  42.         </androidx.cardview.widget.CardView>
  43.  
  44.         <TextView
  45.             android:layout_width="match_parent"
  46.             android:layout_height="match_parent"
  47.             android:text="Brands"
  48.             android:textSize="20sp"
  49.             android:gravity="center"/>
  50.  
  51.  
  52.     </LinearLayout>
  53.     </androidx.cardview.widget.CardView>
  54.  
  55. </LinearLayout>

Editor

You can edit this paste and save as new:


File Description
  • XML
  • Paste Code
  • 28 Feb-2021
  • 1.89 Kb
You can Share it: