Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/main"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/grey_background"
- tools:context=".SecondActivity">
- <!-- Title TextView -->
- <TextView
- android:id="@+id/tvTitle"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:background="@color/grey_background"
- android:gravity="center"
- android:padding="16dp"
- android:text="@string/list_title"
- android:textColor="@android:color/white"
- android:textSize="24sp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
- <!-- SwipeRefreshLayout -->
- <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
- android:id="@+id/swipeRefreshLayout"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/tvTitle">
- <!-- RecyclerView for device list -->
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/recyclerViewDevices"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:clipToPadding="false"
- android:paddingStart="8dp"
- android:paddingTop="16dp"
- android:paddingEnd="8dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
- </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
- <!-- Loading overlay (initially hidden) -->
- <LinearLayout
- android:id="@+id/loadingLayout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="#80000000"
- android:gravity="center"
- android:orientation="vertical"
- android:visibility="gone"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
- <!-- ProgressBar for loading -->
- <ProgressBar
- android:id="@+id/progressBar"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:indeterminate="true" />
- <!-- TextView to show "Searching Device" message -->
- <TextView
- android:id="@+id/loaderText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
- android:text="@string/searching_devices"
- android:textColor="@android:color/white"
- android:textSize="18sp"
- android:padding="12dp"
- android:gravity="center"/>
- </LinearLayout>
- </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement