Added Android code
[wl-app.git] / Android / app / src / main / res / layout / fragment_book_header.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3                 xmlns:tools="http://schemas.android.com/tools"
4                 android:layout_width="match_parent"
5                 android:layout_height="@dimen/book_header_height"
6                 android:animateLayoutChanges="true">
7
8     <ImageView
9         android:id="@+id/ivCoverBackground"
10         android:layout_width="match_parent"
11         android:layout_height="@dimen/book_header_height"
12         android:contentDescription="@string/app_name"
13         android:scaleType="centerCrop"/>
14
15     <View
16         android:id="@+id/vCoverOverlay"
17         android:layout_width="match_parent"
18         android:layout_height="@dimen/book_header_height"/>
19
20     <ImageView
21         android:id="@+id/ivCover"
22         android:layout_width="wrap_content"
23         android:layout_height="match_parent"
24         android:layout_alignParentBottom="true"
25         android:layout_alignParentEnd="true"
26         android:layout_marginRight="15dp"
27         android:layout_marginTop="@dimen/book_header_top"
28         android:adjustViewBounds="true"
29         android:src="@drawable/list_nocover"
30         tools:ignore="ContentDescription,RtlHardcoded"/>
31
32     <LinearLayout
33         android:layout_width="match_parent"
34         android:layout_height="wrap_content"
35         android:layout_centerVertical="true"
36         android:layout_marginTop="@dimen/book_header_top"
37         android:layout_toStartOf="@id/ivCover"
38         android:orientation="vertical"
39         android:paddingLeft="20dp"
40         android:paddingRight="20dp">
41
42         <TextView
43             android:id="@+id/tvBookAuthor"
44             style="@style/BookHeaderTextView"
45             android:layout_width="match_parent"
46             android:layout_height="wrap_content"
47             android:ellipsize="end"
48             android:maxLines="2"/>
49
50         <TextView
51             android:id="@+id/tvBookTitle"
52             style="@style/BookHeaderTextView"
53             android:layout_width="match_parent"
54             android:layout_height="wrap_content"
55             android:ellipsize="end"
56             android:maxLines="2"
57             android:textSize="28dp"
58             tools:ignore="SpUsage"/>
59     </LinearLayout>
60
61     <RelativeLayout
62         android:id="@+id/rlHeaderLoadingContainer"
63         android:layout_width="match_parent"
64         android:layout_height="match_parent"
65         android:background="?attr/colorPrimary">
66
67         <ProgressBar
68             android:id="@+id/pbHeaderLoading"
69             style="@style/Base.Widget.AppCompat.ProgressBar"
70             android:layout_width="wrap_content"
71             android:layout_height="wrap_content"
72             android:layout_centerInParent="true"
73             android:theme="@style/CircularProgress"/>
74
75         <ImageButton
76             android:id="@+id/ibRetry"
77             android:layout_width="wrap_content"
78             android:layout_height="wrap_content"
79             android:layout_centerInParent="true"
80             android:background="@null"
81             android:src="@drawable/refresh_icon_light_selector"
82             android:visibility="gone"
83             tools:ignore="ContentDescription"/>
84     </RelativeLayout>
85
86 </RelativeLayout>