<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scrollbarFadeDuration="0"
    android:scrollbars="vertical"
    tools:context=".InstallActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginBottom="16dp"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/tooLowMemory"
            style="@style/DownloadActivitySegment"
            android:background="@color/warningOrange"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__too_low_memory_title" />

            <TextView
                android:id="@+id/tooLowMemoryDescription"
                style="@style/DefaultTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/unknownSignatureOfInstalledApp"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__unknown_signature_of_installed_app_text1" />

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__unknown_signature_of_installed_app_text2" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/externalStorageNotAccessible"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__external_storage_not_accessible" />

            <TextView
                style="@style/MonospaceSelectableTextView"
                android:id="@+id/externalStorageNotAccessible_state"
                android:text="" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/downloadAppIsDisabled"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__download_app_is_disabled" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fetchUrl"
            style="@style/DownloadActivitySegment">

            <TextView
                android:id="@+id/fetchUrlTextView"
                style="@style/BoldTextView"
                android:text="@string/install_activity__fetch_url_for_download" />

            <ProgressBar
                style="?android:attr/progressBarStyle"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fetchedUrlSuccess"
            style="@style/DownloadActivitySegment">

            <TextView
                android:id="@+id/fetchedUrlSuccessTextView"
                style="@style/BoldTextView"
                android:text="@string/install_activity__fetched_url_for_download_successfully" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/downloadingFile"
            style="@style/DownloadActivitySegment">

            <TextView
                android:id="@+id/downloadingFileText"
                style="@style/BoldTextView"
                android:text="@string/install_activity__download_application_from_with_status" />

            <TextView
                android:id="@+id/downloadingFileUrl"
                style="@style/MonospaceSelectableTextView" />

            <ProgressBar
                android:id="@+id/downloadingFileProgressBar"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/downloadedFile"
            style="@style/DownloadActivitySegment">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__downloaded_application_from" />

            <TextView
                android:id="@+id/downloadedFileUrl"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/useCachedDownloadedApk"
            style="@style/DownloadActivitySegment">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__use_cached_downloaded_apk" />

            <TextView
                android:id="@+id/useCachedDownloadedApk__path"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/downloadFileFailed"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__download_failed" />

            <TextView
                android:id="@+id/downloadFileFailedUrl"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/verifyDownloadFingerprint"
            style="@style/DownloadActivitySegment">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__verifying_downloaded_application_certificate" />

            <ProgressBar
                style="?android:attr/progressBarStyle"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fingerprintDownloadGood"
            style="@style/DownloadActivitySegment"
            android:background="@color/successGreen"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__downloaded_application_is_verified" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__sha_256_certificate_fingerprint" />

            <TextView
                android:id="@+id/fingerprintDownloadGoodHash"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fingerprintDownloadBad"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__downloaded_application_is_not_verified" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__expected_sha_256_certificate_fingerprint" />

            <TextView
                android:id="@+id/fingerprintDownloadBadHashExpected"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/but_was" />

            <TextView
                android:id="@+id/fingerprintDownloadBadHashActual"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:layout_marginTop="8dp"
                android:text="@string/install_activity__invalid_downloaded_certificate_fingerprint_explanation"
                android:textIsSelectable="true" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/installingApplication"
            style="@style/DownloadActivitySegment">

            <ProgressBar
                style="?android:attr/progressBarStyle"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_gravity="center" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/install_activity__retrigger_installation"
            style="@style/DownloadActivitySegment">

            <Button
                android:id="@+id/install_activity__retrigger_installation__button"
                style="@style/DefaultButton"
                android:text="@string/install_activity__retrigger_installation__button_title" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/verifyInstalledFingerprint"
            style="@style/DownloadActivitySegment">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/install_activity__verifying_downloaded_application_certificate" />

            <ProgressBar
                style="?android:attr/progressBarStyle"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fingerprintInstalledGood"
            style="@style/DownloadActivitySegment"
            android:background="@color/successGreen"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/installed_application_is_verified" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__sha_256_certificate_fingerprint" />

            <TextView
                android:id="@+id/fingerprintInstalledGoodHash"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fingerprintInstalledBad"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/installed_app_is_not_verified" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__expected_sha_256_certificate_fingerprint" />

            <TextView
                android:id="@+id/fingerprintInstalledBadHashExpected"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/but_was" />

            <TextView
                android:id="@+id/fingerprintInstalledBadHashActual"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:layout_marginTop="8dp"
                android:text="@string/install_activity__invalid_installed_certificate_fingerprint_explanation"
                android:textIsSelectable="true" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/installerSuccess"
            style="@style/DownloadActivitySegment"
            android:background="@color/successGreen"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/application_successfully_installed" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__you_can_now_close_this_window" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/installerFailed"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/application_installation_was_not_successful" />

            <TextView
                android:id="@+id/installerFailedReason"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__you_can_now_close_this_window" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/install_activity__exception"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                android:id="@+id/install_activity__exception__text"
                style="@style/BoldTextView" />

            <TextView
                android:id="@+id/install_activity__exception__show_button"
                android:text="@string/install_activity__exception__show_button"
                style="@style/DefaultTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__you_can_now_close_this_window" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/install_activity__delete_cache"
            style="@style/DownloadActivitySegment"
            android:padding="8dp">

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__delete_cache_explanation" />

            <Button
                android:id="@+id/install_activity__delete_cache_button"
                style="@style/DefaultButton"
                android:text="@string/install_activity__delete_cache_button_text" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/install_activity__open_cache_folder"
            style="@style/DownloadActivitySegment"
            android:padding="8dp">

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/install_activity__open_cache_explanation" />

            <Button
                android:id="@+id/install_activity__open_cache_folder_button"
                style="@style/DefaultButton"
                android:text="@string/install_activity__open_cache_folder_button_text" />

        </LinearLayout>

    </LinearLayout>

</androidx.core.widget.NestedScrollView>