aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/album_cell_item.xml
blob: 4ad32409e60b94e8292bfe54c19518ae50e990e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0" encoding="utf-8"?>
<github.daneren2005.dsub.view.CardView xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	android:layout_margin="2dp">

	<LinearLayout
		android:orientation="vertical"
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		android:background="?attr/selectableItemBackground">

		<RelativeLayout
			android:layout_width="match_parent"
			android:layout_height="0dp"
			android:layout_weight="1">

			<github.daneren2005.dsub.view.SquareImageView
				android:id="@+id/album_coverart"
				android:layout_width="match_parent"
				android:layout_height="match_parent"/>

			<RatingBar
				android:id="@+id/album_rating"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:isIndicator="true"
				android:layout_centerHorizontal="true"
				android:numStars="5"
				style="@android:style/Widget.Holo.RatingBar.Small"
				android:layout_alignParentBottom="true"
				android:visibility="gone"/>
		</RelativeLayout>

		<LinearLayout
			android:layout_width="fill_parent"
			android:layout_height="wrap_content"
			android:orientation="horizontal"
			android:paddingTop="4dp"
			android:paddingBottom="4dp"
			android:paddingLeft="2dp">

			<LinearLayout
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:layout_weight="1"
				android:gravity="center_vertical"
				android:orientation="vertical">

				<TextView
					android:id="@+id/album_title"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:textAppearance="?android:attr/textAppearanceSmall"
					android:singleLine="true"
					android:ellipsize="marquee"
					android:text="@string/search.albums"
					android:textColor="?android:textColorPrimary"
					android:paddingLeft="@dimen/Card.TextLeftPadding"/>

				<LinearLayout
					android:layout_width="fill_parent"
					android:layout_height="wrap_content">

					<TextView
						android:id="@+id/album_artist"
						android:layout_width="0dp"
						android:layout_weight="1"
						android:layout_height="wrap_content"
						android:textSize="12sp"
						android:textColor="?android:textColorSecondary"
						android:singleLine="true"
						android:text="@string/search.artists"
						android:paddingLeft="@dimen/Card.TextLeftPadding"/>

					<ImageButton
						android:id="@+id/album_star"
						android:layout_width="@dimen/Star.Small"
						android:layout_height="@dimen/Star.Small"
						android:scaleType="fitCenter"
						android:layout_gravity="right|center_vertical"
						android:background="@android:color/transparent"
						android:focusable="false"
						android:visibility="gone"/>
				</LinearLayout>
			</LinearLayout>

			<ImageView
				android:id="@+id/item_more"
				android:src="?attr/download_none"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="right|center_vertical"
				style="@style/MoreButton"/>
		</LinearLayout>

	</LinearLayout>
</github.daneren2005.dsub.view.CardView>