OSDN Git Service

Eleven: Add two sliding panels to the player
[android-x86/packages-apps-Eleven.git] / res / layout / activity_player_fragment.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3   Copyright (C) 2012 Andrew Neal
4  
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8  
9        http://www.apache.org/licenses/LICENSE-2.0
10  
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16 -->
17 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
18     android:layout_width="match_parent"
19     android:layout_height="match_parent" >
20
21     <LinearLayout
22         android:layout_width="match_parent"
23         android:layout_height="match_parent"
24         android:orientation="vertical">
25
26         <RelativeLayout
27             android:id="@+id/album_art_section"
28             android:layout_width="match_parent"
29             android:layout_height="wrap_content"
30             android:layout_above="@android:id/progress"
31             android:layout_alignParentLeft="true"
32             android:layout_alignParentRight="true"
33             android:layout_alignParentTop="true" >
34
35             <com.cyngn.eleven.widgets.SquareImageView
36                 android:id="@+id/audio_player_album_art"
37                 android:layout_width="match_parent"
38                 android:layout_height="match_parent"
39                 android:layout_centerHorizontal="true"
40                 android:scaleType="fitXY" />
41
42             <ImageView
43                 android:layout_width="match_parent"
44                 android:layout_height="@dimen/shadow_height"
45                 android:layout_alignTop="@+id/audio_player_album_art"
46                 android:contentDescription="@null"
47                 android:src="@drawable/top_shadow" />
48
49             <ImageView
50                 android:layout_width="match_parent"
51                 android:layout_height="@dimen/shadow_height"
52                 android:layout_alignBottom="@+id/audio_player_album_art"
53                 android:contentDescription="@null"
54                 android:src="@drawable/bottom_shadow" />
55
56         </RelativeLayout>
57
58         <LinearLayout
59             android:id="@+id/audio_player_header"
60             android:layout_width="match_parent"
61             android:layout_height="@dimen/audio_player_header_height"
62             android:baselineAligned="false"
63             android:orientation="horizontal">
64
65             <!-- TODO: Add + Icon -->
66             <LinearLayout
67                 android:layout_width="0dp"
68                 android:layout_height="wrap_content"
69                 android:layout_gravity="center_vertical"
70                 android:layout_weight="1"
71                 android:orientation="vertical">
72
73                 <TextView
74                     android:id="@+id/audio_player_track_name"
75                     android:layout_width="match_parent"
76                     android:layout_height="wrap_content"
77                     android:gravity="center_horizontal"
78                     android:ellipsize="end"
79                     android:singleLine="true"
80                     android:textSize="@dimen/text_size_medium"
81                     android:textStyle="bold" />
82
83                 <TextView
84                     android:id="@+id/audio_player_artist_name"
85                     android:layout_width="match_parent"
86                     android:layout_height="wrap_content"
87                     android:gravity="center_horizontal"
88                     android:ellipsize="end"
89                     android:singleLine="true"
90                     android:textSize="@dimen/text_size_medium" />
91             </LinearLayout>
92             <!-- TODO: Add ... Icon -->
93         </LinearLayout>
94
95         <RelativeLayout
96             android:layout_width="match_parent"
97             android:layout_height="wrap_content">
98             <TextView
99                 android:id="@+id/audio_player_current_time"
100                 android:layout_width="@dimen/audio_player_time_width"
101                 android:layout_height="wrap_content"
102                 android:layout_alignBottom="@android:id/progress"
103                 android:layout_alignParentLeft="true"
104                 android:layout_alignTop="@android:id/progress"
105                 android:gravity="center"
106                 android:textSize="@dimen/text_size_micro" />
107
108             <TextView
109                 android:id="@+id/audio_player_total_time"
110                 android:layout_width="@dimen/audio_player_time_width"
111                 android:layout_height="wrap_content"
112                 android:layout_alignBottom="@android:id/progress"
113                 android:layout_alignParentRight="true"
114                 android:layout_alignTop="@android:id/progress"
115                 android:gravity="center"
116                 android:textSize="@dimen/text_size_micro" />
117
118             <SeekBar
119                 android:id="@android:id/progress"
120                 android:layout_width="match_parent"
121                 android:layout_height="wrap_content"
122                 android:layout_above="@+id/audio_player_controlss"
123                 android:layout_marginBottom="@dimen/audio_player_seek_bar_margin_bottom"
124                 android:layout_toLeftOf="@+id/audio_player_total_time"
125                 android:layout_toRightOf="@+id/audio_player_current_time"
126                 android:max="1000"
127                 android:thumb="@null" />
128
129             <LinearLayout
130                 android:id="@+id/audio_player_controlss"
131                 android:layout_width="match_parent"
132                 android:layout_height="wrap_content"
133                 android:layout_alignParentBottom="true"
134                 android:layout_alignParentLeft="true"
135                 android:layout_alignParentRight="true"
136                 android:baselineAligned="false"
137                 android:gravity="center" >
138
139                 <include layout="@layout/audio_player_controls" />
140             </LinearLayout>
141         </RelativeLayout>
142     </LinearLayout>
143 </FrameLayout>