activity_main.xml 1.3 KB

12345678910111213141516171819202122232425262728293031
  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. tools:context=".MainActivity">
  8. <EditText
  9. android:id="@+id/edtxt"
  10. android:layout_width="wrap_content"
  11. android:layout_height="wrap_content"
  12. android:hint="Search Giphy"
  13. app:layout_constraintLeft_toLeftOf="parent"
  14. app:layout_constraintRight_toRightOf="parent"
  15. app:layout_constraintTop_toTopOf="parent" />
  16. <androidx.recyclerview.widget.RecyclerView
  17. android:id="@+id/gifsList"
  18. android:layout_width="match_parent"
  19. android:layout_height="match_parent"
  20. android:layout_marginTop="20dp"
  21. android:gravity="center"
  22. app:layout_constrainedHeight="true"
  23. app:layout_constraintTop_toBottomOf="@id/edtxt"
  24. app:layout_constraintEnd_toEndOf="parent"
  25. app:layout_constraintStart_toStartOf="parent"
  26. />
  27. </androidx.constraintlayout.widget.ConstraintLayout>