Added Android code
[wl-app.git] / Android / app / src / main / res / layout / library_header.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <android.support.constraint.ConstraintLayout
3     xmlns:android="http://schemas.android.com/apk/res/android"
4     xmlns:app="http://schemas.android.com/apk/res-auto"
5     xmlns:tools="http://schemas.android.com/tools"
6     android:layout_width="match_parent"
7     android:layout_height="wrap_content"
8     android:animateLayoutChanges="true">
9
10     <LinearLayout
11         android:id="@+id/linearLayout"
12         android:layout_width="match_parent"
13         android:layout_height="wrap_content"
14         android:background="@color/splash_background"
15         android:gravity="center_vertical"
16         android:orientation="horizontal"
17         android:paddingBottom="10dp"
18         android:paddingEnd="10dp"
19         android:paddingStart="10dp">
20
21         <android.support.v7.widget.CardView
22             android:layout_width="@dimen/thumb_size"
23             android:layout_height="wrap_content"
24             app:cardCornerRadius="@dimen/thumb_corners">
25
26             <ImageView
27                 android:id="@+id/ivBookCover"
28                 android:layout_width="match_parent"
29                 android:layout_height="wrap_content"
30                 android:adjustViewBounds="true"
31                 android:scaleType="fitXY"
32                 android:src="@drawable/list_nocover"
33                 tools:ignore="ContentDescription"/>
34         </android.support.v7.widget.CardView>
35
36         <LinearLayout
37             android:layout_width="match_parent"
38             android:layout_height="wrap_content"
39             android:orientation="vertical"
40             android:paddingEnd="10dp"
41             android:paddingStart="10dp">
42
43             <RelativeLayout
44                 android:layout_width="match_parent"
45                 android:layout_height="wrap_content">
46
47                 <TextView
48                     android:id="@+id/tvBookAuthor"
49                     style="@style/ListTitleText.Black"
50                     android:layout_width="match_parent"
51                     android:layout_height="wrap_content"
52                     android:layout_toStartOf="@id/ibDeleteEbook"
53                     android:text="Juliusz SÅ‚owacki"
54                     android:textColor="@color/white"/>
55
56                 <TextView
57                     android:id="@+id/tvBookTitle"
58                     style="@style/ListHeaderText"
59                     android:layout_width="match_parent"
60                     android:layout_height="wrap_content"
61                     android:layout_below="@id/tvBookAuthor"
62                     android:layout_toStartOf="@id/ibDeleteEbook"
63                     android:text="Kordian"
64                     android:textColor="@color/orange_light"/>
65
66             </RelativeLayout>
67
68             <View
69                 android:layout_width="match_parent"
70                 android:layout_height="1dp"
71                 android:layout_marginBottom="5dp"
72                 android:layout_marginTop="5dp"
73                 android:background="@color/white"/>
74
75             <RelativeLayout
76                 android:layout_width="match_parent"
77                 android:layout_height="wrap_content">
78
79                 <ImageView
80                     android:id="@+id/ivEbook"
81                     android:layout_width="wrap_content"
82                     android:layout_height="wrap_content"
83                     android:layout_alignParentStart="true"
84                     android:layout_alignParentTop="true"
85                     app:srcCompat="@drawable/ic_glass_mid_tint_white"
86                     tools:ignore="ContentDescription"/>
87
88                 <ImageView
89                     android:id="@+id/ivAudiobook"
90                     android:layout_width="wrap_content"
91                     android:layout_height="wrap_content"
92                     android:layout_centerVertical="true"
93                     android:layout_marginStart="10dp"
94                     android:layout_toEndOf="@id/ivEbook"
95                     app:srcCompat="@drawable/ic_speaker_mid_tint_white"
96                     tools:ignore="ContentDescription"/>
97
98             </RelativeLayout>
99
100             <TableLayout
101                 android:layout_width="match_parent"
102                 android:layout_height="wrap_content">
103
104                 <TableRow>
105
106                     <TextView
107                         style="@style/ListTableTitleText"
108                         android:layout_width="match_parent"
109                         android:layout_height="wrap_content"
110                         android:layout_weight="1"
111                         android:text="@string/book_epoch"
112                         android:textColor="@color/white"
113                         android:textSize="8dp"/>
114
115                     <TextView
116                         android:id="@+id/tvBookEpoch"
117                         style="@style/ListTitleText.Orange"
118                         android:layout_width="match_parent"
119                         android:layout_height="wrap_content"
120                         android:layout_weight="7"
121                         android:text="Romantyzm"/>
122                 </TableRow>
123
124                 <TableRow>
125
126                     <TextView
127                         style="@style/ListTableTitleText"
128                         android:layout_width="match_parent"
129                         android:layout_height="wrap_content"
130                         android:layout_weight="1"
131                         android:text="@string/book_kind"
132                         android:textColor="@color/white"
133                         android:textSize="8dp"/>
134
135                     <TextView
136                         android:id="@+id/tvBookKind"
137                         style="@style/ListTitleText.Orange"
138                         android:layout_width="match_parent"
139                         android:layout_height="wrap_content"
140                         android:layout_weight="7"/>
141                 </TableRow>
142
143                 <TableRow>
144
145                     <TextView
146                         style="@style/ListTableTitleText"
147                         android:layout_width="match_parent"
148                         android:layout_height="wrap_content"
149                         android:layout_weight="1"
150                         android:text="@string/book_genre"
151                         android:textColor="@color/white"
152                         android:textSize="8dp"/>
153
154                     <TextView
155                         android:id="@+id/tvBookGenre"
156                         style="@style/ListTitleText.Orange"
157                         android:layout_width="match_parent"
158                         android:layout_height="wrap_content"
159                         android:layout_weight="7"/>
160                 </TableRow>
161             </TableLayout>
162         </LinearLayout>
163     </LinearLayout>
164
165     <RelativeLayout
166         android:id="@+id/rlHeaderLoadingContainer"
167         android:layout_width="match_parent"
168         android:layout_height="0dp"
169         android:background="@color/splash_background"
170         app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
171         app:layout_constraintTop_toTopOf="@+id/linearLayout">
172
173         <ProgressBar
174             android:id="@+id/pbHeaderLoading"
175             style="@style/Base.Widget.AppCompat.ProgressBar"
176             android:layout_width="wrap_content"
177             android:layout_height="wrap_content"
178             android:layout_centerInParent="true"
179             android:theme="@style/CircularProgress"/>
180
181         <TextView
182             android:id="@+id/tvEmpty"
183             style="@style/BookHeaderTextView"
184             android:layout_width="match_parent"
185             android:layout_height="match_parent"
186             android:gravity="center"
187             android:padding="20dp"
188             android:text="@string/no_prapremiere_message"
189             android:textSize="14sp"
190             android:visibility="gone"/>
191
192         <ImageButton
193             android:id="@+id/ibRetry"
194             android:layout_width="wrap_content"
195             android:layout_height="wrap_content"
196             android:layout_centerInParent="true"
197             android:background="@null"
198             android:src="@drawable/refresh_icon_light_selector"
199             android:visibility="gone"
200             tools:ignore="ContentDescription"/>
201     </RelativeLayout>
202 </android.support.constraint.ConstraintLayout>
203