HumanLearning2021/HumanLearningApp

View on GitHub
app/src/main/res/layout/fragment_download_switch.xml

Summary

Maintainability
Test Coverage
<?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"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <androidx.appcompat.widget.SwitchCompat
        android:id="@+id/download_switch"
        android:layout_width="wrap_content"
        android:layout_height="36dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/download_progress_icon"
        app:layout_constraintStart_toStartOf="@+id/download_icon"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/download_icon"
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:src="@drawable/download_switch_icon"
        android:background="@color/white"
        android:scaleType="centerCrop"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/download_switch"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:contentDescription="@string/Download_icon" />

    <ProgressBar
        android:id="@+id/download_progress_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:indeterminate="true"
        android:visibility="invisible"
        app:layout_constraintStart_toEndOf="@id/download_switch"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>