embed progress bar in the last update row
[mobile-ledger.git] / app / src / main / res / layout / transaction_list_fragment.xml
1 <?xml version="1.0" encoding="utf-8"?><!--
2   ~ Copyright © 2018 Damyan Ivanov.
3   ~ This file is part of Mobile-Ledger.
4   ~ Mobile-Ledger is free software: you can distribute it and/or modify it
5   ~ under the term of the GNU General Public License as published by
6   ~ the Free Software Foundation, either version 3 of the License, or
7   ~ (at your opinion), any later version.
8   ~
9   ~ Mobile-Ledger is distributed in the hope that it will be useful,
10   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11   ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   ~ GNU General Public License terms for details.
13   ~
14   ~ You should have received a copy of the GNU General Public License
15   ~ along with Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
16   -->
17
18 <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
19     xmlns:app="http://schemas.android.com/apk/res-auto"
20     xmlns:tools="http://schemas.android.com/tools"
21     android:id="@+id/transaction_list"
22     android:layout_width="match_parent"
23     android:layout_height="match_parent"
24     app:layout_behavior="@string/appbar_scrolling_view_behavior"
25     app:layout_constraintBottom_toBottomOf="parent"
26     tools:context=".TransactionListActivity">
27
28     <LinearLayout
29         android:id="@+id/last_update_row"
30         android:layout_width="match_parent"
31         android:layout_height="wrap_content"
32         android:orientation="vertical"
33         app:layout_constraintEnd_toEndOf="parent"
34         app:layout_constraintStart_toStartOf="parent"
35         app:layout_constraintTop_toTopOf="parent">
36
37         <LinearLayout
38             android:layout_width="match_parent"
39             android:layout_height="wrap_content"
40             android:elevation="24dp"
41             android:orientation="horizontal">
42
43             <TextView
44                 android:id="@+id/transaction_last_update_label"
45                 android:layout_width="wrap_content"
46                 android:layout_height="wrap_content"
47                 android:paddingEnd="8dp"
48                 android:text="@string/transactions_last_update_label"
49                 app:layout_constraintEnd_toEndOf="parent"
50                 app:layout_constraintStart_toStartOf="parent" />
51
52             <TextView
53                 android:id="@+id/transactions_last_update"
54                 android:layout_width="wrap_content"
55                 android:layout_height="wrap_content"
56                 android:layout_weight="1"
57                 android:text="\?"
58                 tools:ignore="HardcodedText" />
59         </LinearLayout>
60
61         <ProgressBar
62             android:id="@+id/transaction_progress_bar"
63             style="?android:attr/progressBarStyleHorizontal"
64             android:layout_width="match_parent"
65             android:layout_height="wrap_content"
66             android:layout_marginTop="-8dp"
67             android:layout_marginBottom="-7dp"
68             android:indeterminate="true"
69             android:padding="0dp"
70             android:progressTint="@color/colorPrimary"
71             android:visibility="invisible"
72             app:layout_constraintEnd_toEndOf="parent"
73             app:layout_constraintStart_toStartOf="parent"
74             app:layout_constraintTop_toBottomOf="@+id/last_update_row" />
75
76     </LinearLayout>
77
78     <android.support.v4.widget.SwipeRefreshLayout
79         android:id="@+id/transaction_swipe"
80         android:layout_width="match_parent"
81         android:layout_height="0dp"
82         app:layout_constraintBottom_toBottomOf="parent"
83         app:layout_constraintEnd_toEndOf="parent"
84         app:layout_constraintStart_toStartOf="parent"
85         app:layout_constraintTop_toBottomOf="@+id/last_update_row">
86
87         <android.support.v7.widget.RecyclerView
88             android:id="@+id/transaction_root"
89             android:layout_width="match_parent"
90             android:layout_height="match_parent"
91             android:scrollbars="vertical" />
92     </android.support.v4.widget.SwipeRefreshLayout>
93
94     <View
95         android:layout_width="0dp"
96         android:layout_height="4dp"
97         android:background="@drawable/drop_shadow"
98         app:layout_constraintTop_toBottomOf="@+id/last_update_row" />
99 </android.support.constraint.ConstraintLayout>