Added Android code
[wl-app.git] / Android / app / src / main / res / layout / book_item.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <android.support.v7.widget.CardView
3     xmlns:android="http://schemas.android.com/apk/res/android"
4     xmlns:app="http://schemas.android.com/apk/res-auto"
5     android:layout_width="145dp"
6     android:layout_height="200dp"
7     android:layout_marginEnd="10dp"
8     android:layout_marginStart="10dp"
9     app:cardBackgroundColor="@color/white"
10     app:cardCornerRadius="8dp">
11
12     <android.support.constraint.ConstraintLayout
13         android:layout_width="match_parent"
14         android:layout_height="match_parent">
15
16         <ImageView
17             android:id="@+id/ivBookCover"
18             android:layout_width="match_parent"
19             android:layout_height="match_parent"
20             android:scaleType="fitCenter"
21             app:layout_constraintBottom_toBottomOf="parent"
22             app:layout_constraintEnd_toEndOf="parent"
23             app:layout_constraintStart_toStartOf="parent"
24             app:layout_constraintTop_toTopOf="parent"/>
25
26
27         <LinearLayout
28             android:id="@+id/llBookContent"
29             android:layout_width="match_parent"
30             android:layout_height="wrap_content"
31             android:background="@color/orange_overlay"
32             android:gravity="center"
33             android:orientation="vertical"
34             android:padding="10dp"
35             app:layout_constraintBottom_toBottomOf="parent"
36             app:layout_constraintEnd_toEndOf="parent"
37             app:layout_constraintStart_toStartOf="parent">
38
39
40             <TextView
41                 android:id="@+id/tvBookAuthor"
42                 android:layout_width="wrap_content"
43                 android:layout_height="wrap_content"
44                 android:gravity="center"
45                 android:text="Maria Konopnicka"
46                 android:textColor="@color/white"
47                 android:textSize="13dp"/>
48
49             <TextView
50                 android:id="@+id/tvBookTitle"
51                 android:layout_width="wrap_content"
52                 android:layout_height="wrap_content"
53                 android:ellipsize="end"
54                 android:gravity="center"
55                 android:maxLines="4"
56                 android:text="Poezje dla dzieci do lat 7, część I"
57                 android:textColor="@color/white"
58                 android:textSize="14dp"
59                 android:textStyle="bold"/>
60         </LinearLayout>
61
62         <LinearLayout
63             android:layout_width="wrap_content"
64             android:layout_height="wrap_content"
65             android:layout_marginBottom="5dp"
66             android:orientation="horizontal"
67             app:layout_constraintBottom_toTopOf="@id/llBookContent"
68             app:layout_constraintEnd_toEndOf="parent"
69             app:layout_constraintStart_toStartOf="parent">
70
71             <ImageView
72                 android:layout_width="wrap_content"
73                 android:layout_height="wrap_content"
74                 android:layout_marginEnd="5dp"
75                 android:background="@drawable/round_background_overlay"
76                 android:padding="4dp"
77                 android:src="@drawable/ic_glass_small"
78                 android:tint="@color/white"/>
79
80             <ImageView
81                 android:id="@+id/ivAudioBook"
82                 android:layout_width="wrap_content"
83                 android:layout_height="wrap_content"
84                 android:background="@drawable/round_background_overlay"
85                 android:padding="4dp"
86                 android:src="@drawable/ic_speaker_small"
87                 android:tint="@color/white"/>
88
89         </LinearLayout>
90
91     </android.support.constraint.ConstraintLayout>
92 </android.support.v7.widget.CardView>