tv_audio_player.xml 3.93 KB
Newer Older
1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
Geoffrey Métais's avatar
Geoffrey Métais committed
10
        android:weightSum="3" >
11
12
13
14
15
16
17

        <!-- Cover -->
        <ImageView
            android:id="@+id/album_cover"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="2"
Geoffrey Métais's avatar
Geoffrey Métais committed
18
19
20
            android:padding="10dp"
            android:src="@drawable/background_cone"
            android:scaleType="fitXY" >
21
22
23
24
25
26
27
28
29
30
31
32
33
34
        </ImageView>

        <!-- Playlist -->
        <android.support.v7.widget.RecyclerView
            android:id="@+id/playlist"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:scrollbars="vertical" />
    </LinearLayout>

    <!-- Media HUD -->
    <RelativeLayout
        android:layout_width="wrap_content"
35
        android:minWidth="500dp"
36
37
38
39
40
41
42
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        android:paddingRight="30dip"
        android:paddingLeft="30dip"
        android:paddingTop="10dip"
        android:paddingBottom="5dip"
43
        android:alpha="0.5"
Geoffrey Métais's avatar
Geoffrey Métais committed
44
        android:background="@android:color/black">
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
99
100
101
102
103
        <TextView
            android:id="@+id/media_title"
	        android:layout_width="wrap_content"
	        android:layout_height="wrap_content"
	        android:layout_centerHorizontal="true"
	        android:layout_alignParentTop="true"
	        android:textAppearance="@style/TextAppearance.AppCompat.SearchResult.Title"/>
        <TextView
            android:id="@+id/media_artist"
	        android:layout_width="wrap_content"
	        android:layout_height="wrap_content"
	        android:layout_centerHorizontal="true"
	        android:layout_below="@id/media_title"
	        android:textAppearance="@style/TextAppearance.AppCompat.SearchResult.Subtitle"/>
        <ProgressBar
            android:id="@+id/media_progress"
	        android:layout_width="wrap_content"
	        android:layout_height="wrap_content"
	        style="?android:attr/progressBarStyleHorizontal"
	        android:layout_centerHorizontal="true"
	        android:layout_below="@id/media_artist"
	        android:layout_alignStart="@+id/media_controls"
	        android:layout_alignEnd="@+id/media_controls"
	        android:indeterminate="false"/>
        <!-- Media control buttons -->
         <LinearLayout
            android:id="@+id/media_controls"
	        android:layout_width="wrap_content"
	        android:layout_height="wrap_content"
	        android:orientation="horizontal"
	        android:layout_centerHorizontal="true"
	        android:layout_below="@id/media_progress">
	        <ImageView
	            android:id="@+id/button_previous"
	            android:layout_width="wrap_content"
	            android:layout_height="wrap_content"
	            android:src="@drawable/ic_previous"
	            android:clickable="true"
	            android:onClick="onClick"/>
	        <ImageView
	            android:id="@+id/button_play"
	            android:layout_width="wrap_content"
	            android:layout_height="wrap_content"
	            android:layout_marginLeft="10dp"
	            android:layout_marginRight="10dp"
	            android:src="@drawable/ic_play"
	            android:clickable="true"
	            android:onClick="onClick"/>
	        <ImageView
	            android:id="@+id/button_next"
	            android:layout_width="wrap_content"
	            android:layout_height="wrap_content"
	            android:src="@drawable/ic_next"
	            android:clickable="true"
	            android:onClick="onClick"/>
	        </LinearLayout>
    </RelativeLayout>

</RelativeLayout>