Advertisement
mmayoub

activity_main.xml

Mar 3rd, 2023 (edited)
948
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.71 KB | Software | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout 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:layout_margin="6dp"
  8.    tools:context=".MainActivity">
  9.  
  10.     <androidx.recyclerview.widget.RecyclerView
  11.        android:id="@+id/rcvItems"
  12.        android:layout_width="0dp"
  13.        android:layout_height="0dp"
  14.        app:layout_constraintBottom_toTopOf="@+id/btnOK"
  15.        app:layout_constraintEnd_toEndOf="parent"
  16.        app:layout_constraintHorizontal_bias="1.0"
  17.        app:layout_constraintStart_toStartOf="parent"
  18.        app:layout_constraintTop_toBottomOf="@+id/textView"
  19.        app:layout_constraintVertical_bias="0.0" />
  20.  
  21.     <TextView
  22.        android:id="@+id/textView"
  23.        android:layout_width="0dp"
  24.        android:layout_height="wrap_content"
  25.        android:background="#C7C36C"
  26.        android:text="TextView"
  27.        android:textAlignment="center"
  28.        android:textSize="24sp"
  29.        android:textStyle="bold"
  30.        app:layout_constraintEnd_toEndOf="parent"
  31.        app:layout_constraintStart_toStartOf="parent"
  32.        app:layout_constraintTop_toTopOf="parent" />
  33.  
  34.     <Button
  35.        android:id="@+id/btnOK"
  36.        android:layout_width="0dp"
  37.        android:layout_height="wrap_content"
  38.        android:text="Button"
  39.        app:layout_constraintBottom_toBottomOf="parent"
  40.        app:layout_constraintEnd_toEndOf="parent"
  41.        app:layout_constraintStart_toStartOf="parent" />
  42. </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement