hyperrail/hyperrail-for-android

View on GitHub
Hyperrail/src/main/res/layout/fragment_recyclerview_vehiclejourney_nomap.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?><!--
  ~  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  ~  If a copy of the MPL was not distributed with this file,
  ~  You can obtain one at http://mozilla.org/MPL/2.0/.
  -->
<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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="top"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/fragment_vehicle_composition"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#a0fafafa"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:id="@+id/swiperefresh"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/fragment_vehicle_composition">

        <!-- This layout could use some improvements, but replacing the recyclerview with an error message requires something else than a SwipeRefreshLayout as parent -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recyclerview_primary"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:clipToPadding="false"
                android:paddingBottom="@dimen/cardlist_vertical_spacing" />

            <include layout="@layout/include_error_message" />
        </LinearLayout>

    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>