OSDN Git Service

Eleven: rebrand step 2: update file contents
[android-x86/packages-apps-Eleven.git] / res / layout / main_playback_controls.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3   Copyright (C) 2012 Andrew Neal
4   Copyright (C) 2014 The CyanogenMod Project
5
6   Licensed under the Apache License, Version 2.0 (the "License");
7   you may not use this file except in compliance with the License.
8   You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17 -->
18 <android.support.v7.widget.CardView
19     xmlns:android="http://schemas.android.com/apk/res/android"
20     xmlns:card_view="http://schemas.android.com/apk/res-auto"
21     android:layout_width="fill_parent"
22     android:layout_height="fill_parent"
23     card_view:cardCornerRadius="@dimen/audio_player_controls_card_corner_radius"
24     card_view:contentPadding="@dimen/audio_player_controls_card_content_padding"
25     card_view:cardElevation="@dimen/audio_player_controls_card_elevation"
26     card_view:cardUseCompatPadding="true"
27     card_view:cardBackgroundColor="@color/semitransparent_black" >
28     <RelativeLayout
29             android:layout_width="fill_parent"
30             android:layout_height="fill_parent" >
31
32         <include
33             android:contentDescription="@string/accessibility_play"
34             android:id="@+id/playPauseProgressButton"
35             android:layout_width="@dimen/audio_player_controls_main_button_width"
36             android:layout_height="@dimen/audio_player_controls_main_button_height"
37             android:layout_centerInParent="true"
38             android:background="@drawable/fab_accent"
39             android:gravity="center_horizontal"
40             layout="@layout/play_pause_progress_button" />
41
42         <!-- This is the left side of the progress bar - it has the previous
43         and shuffle button and the current time text -->
44         <RelativeLayout
45             android:layout_width="wrap_content"
46             android:layout_height="fill_parent"
47             android:layout_toLeftOf="@id/playPauseProgressButton">
48
49             <TextView
50                 android:id="@+id/audio_player_current_time"
51                 android:layout_width="52dp"
52                 android:layout_height="@dimen/audio_player_controls_end_button_height"
53                 android:gravity="left|center_vertical"
54                 android:layout_alignParentRight="true"
55                 android:layout_centerVertical="true"
56                 android:paddingLeft="@dimen/audio_player_time_text_padding"
57                 android:textColor="@color/audio_player_current_time_color"
58                 android:textSize="@dimen/audio_player_time_text_size"
59                 android:textStyle="bold"/>
60
61             <org.lineageos.eleven.widgets.RepeatingImageButton
62                 android:id="@+id/action_button_previous"
63                 android:layout_width="@dimen/audio_player_controls_end_button_width"
64                 android:layout_height="@dimen/audio_player_controls_end_button_height"
65                 android:layout_toLeftOf="@id/audio_player_current_time"
66                 android:layout_centerVertical="true"
67                 android:scaleType="fitCenter"
68                 android:src="@drawable/btn_playback_previous" />
69
70             <!-- divider -->
71             <View
72                 android:id="@+id/action_button_left_bottom_divider"
73                 android:layout_height="@dimen/audio_player_divider_height"
74                 android:layout_width="@dimen/audio_player_divider_length"
75                 android:layout_marginRight="@dimen/audio_player_divider_horizontal_offset"
76                 android:layout_alignParentRight="true"
77                 android:layout_below="@id/audio_player_current_time"
78                 android:background="@color/now_playing_divider" />
79
80             <org.lineageos.eleven.widgets.ShuffleButton
81                 android:id="@+id/action_button_shuffle"
82                 android:layout_width="@dimen/audio_player_controls_end_button_width"
83                 android:layout_height="@dimen/audio_player_controls_end_button_height"
84                 android:layout_below="@id/action_button_left_bottom_divider"
85                 android:layout_alignLeft="@id/action_button_previous"
86                 android:layout_marginLeft="@dimen/audio_player_controls_end_button_half_width"
87                 android:contentDescription="@string/accessibility_shuffle"
88                 android:scaleType="fitCenter"
89                 android:src="@drawable/btn_playback_shuffle_all" />
90         </RelativeLayout>
91
92         <!-- This is the right side of the progress bar - it has the next
93         and repeat button and the total time text -->
94         <RelativeLayout
95             android:layout_width="wrap_content"
96             android:layout_height="fill_parent"
97             android:layout_toRightOf="@id/playPauseProgressButton">
98
99             <TextView
100                 android:id="@+id/audio_player_total_time"
101                 android:layout_width="52dp"
102                 android:layout_height="@dimen/audio_player_controls_end_button_height"
103                 android:layout_alignParentLeft="true"
104                 android:layout_centerVertical="true"
105                 android:paddingRight="@dimen/audio_player_time_text_padding"
106                 android:gravity="right|center_vertical"
107                 android:textColor="@color/audio_player_total_time_color"
108                 android:textSize="@dimen/audio_player_time_text_size"
109                 android:textStyle="bold"/>
110
111             <org.lineageos.eleven.widgets.RepeatingImageButton
112                 android:id="@+id/action_button_next"
113                 android:layout_width="@dimen/audio_player_controls_end_button_width"
114                 android:layout_height="@dimen/audio_player_controls_end_button_height"
115                 android:layout_toRightOf="@id/audio_player_total_time"
116                 android:layout_centerVertical="true"
117                 android:scaleType="fitCenter"
118                 android:src="@drawable/btn_playback_next" />
119
120             <!-- divider -->
121             <View
122                 android:id="@+id/action_button_right_bottom_divider"
123                 android:layout_height="@dimen/audio_player_divider_height"
124                 android:layout_width="@dimen/audio_player_divider_length"
125                 android:layout_marginLeft="@dimen/audio_player_divider_horizontal_offset"
126                 android:layout_alignParentLeft="true"
127                 android:layout_below="@id/audio_player_total_time" />
128
129             <org.lineageos.eleven.widgets.RepeatButton
130                 android:id="@+id/action_button_repeat"
131                 android:layout_width="@dimen/audio_player_controls_end_button_width"
132                 android:layout_height="@dimen/audio_player_controls_end_button_height"
133                 android:layout_below="@id/audio_player_total_time"
134                 android:layout_alignRight="@id/action_button_next"
135                 android:layout_marginRight="@dimen/audio_player_controls_end_button_half_width"
136                 android:contentDescription="@string/accessibility_repeat"
137                 android:focusable="true"
138                 android:scaleType="fitCenter"
139                 android:src="@drawable/btn_playback_repeat_all" />
140
141         </RelativeLayout>
142
143     </RelativeLayout>
144 </android.support.v7.widget.CardView>