blob: da82e4052e9410efccebdf8b99c4176d59b113e3 [file] [log] [blame]
Jim Miller6b05d582011-07-18 13:09:59 -07001<?xml version="1.0" encoding="utf-8"?>
Jim Miller1c188282011-08-08 22:27:58 -07002<!-- Copyright (C) 2011 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
Jim Miller6b05d582011-07-18 13:09:59 -070015-->
16
Jim Millerff2aa0b2012-09-06 19:03:52 -070017<!-- This is a view to control music playback in keyguard. -->
Jim Miller5ecd8112013-01-09 18:50:26 -080018<com.android.keyguard.KeyguardTransportControlView
Jim Miller6b05d582011-07-18 13:09:59 -070019 xmlns:android="http://schemas.android.com/apk/res/android"
Jim Millerff2aa0b2012-09-06 19:03:52 -070020 android:layout_width="wrap_content"
21 android:layout_height="wrap_content"
22 android:gravity="center_horizontal"
23 android:id="@+id/keyguard_transport_control">
Jim Miller6b05d582011-07-18 13:09:59 -070024
Jim Miller1c188282011-08-08 22:27:58 -070025 <LinearLayout
26 android:orientation="vertical"
27 android:layout_width="match_parent"
Jim Miller6b05d582011-07-18 13:09:59 -070028 android:layout_height="wrap_content"
Adam Powellf8895242013-09-30 16:16:24 -070029 android:layout_gravity="top"
30 android:gravity="center">
31 <ImageView
32 android:id="@+id/badge"
33 android:layout_width="32dp"
34 android:layout_height="32dp"
35 android:scaleType="fitCenter" />
36 <FrameLayout
37 android:id="@+id/info_container"
Jim Miller1c188282011-08-08 22:27:58 -070038 android:layout_width="match_parent"
Adam Powellf8895242013-09-30 16:16:24 -070039 android:layout_height="wrap_content">
40 <LinearLayout
41 android:id="@+id/metadata_container"
42 android:orientation="vertical"
43 android:layout_width="match_parent"
44 android:layout_height="wrap_content"
45 android:layout_gravity="center">
46 <TextView
47 android:id="@+id/title"
48 android:layout_width="match_parent"
49 android:layout_height="wrap_content"
50 android:layout_marginStart="16dip"
51 android:layout_marginEnd="16dip"
52 android:gravity="center_horizontal"
53 android:singleLine="true"
54 android:ellipsize="marquee"
55 android:textAppearance="?android:attr/textAppearanceLarge"
56 android:fontFamily="sans-serif-light" />
57 <TextView
58 android:id="@+id/artist_album"
59 android:layout_width="match_parent"
60 android:layout_height="wrap_content"
61 android:layout_marginStart="16dip"
62 android:layout_marginEnd="16dip"
63 android:gravity="center_horizontal"
64 android:singleLine="true"
65 android:ellipsize="marquee"
66 android:textAppearance="?android:attr/textAppearanceSmall"
67 android:textColor="?android:attr/textColorSecondary" />
68 </LinearLayout>
69 <RelativeLayout
70 android:id="@+id/transient_seek"
71 android:layout_width="match_parent"
72 android:layout_height="wrap_content"
73 android:layout_gravity="center"
74 android:visibility="invisible">
75 <SeekBar
76 android:id="@+id/transient_seek_bar"
77 android:layout_width="match_parent"
Adam Powell31049d72013-10-07 12:58:42 -070078 android:layout_height="wrap_content"
79 style="@style/Widget.TransportControl.SeekBar" />
Adam Powellf8895242013-09-30 16:16:24 -070080 <TextView
81 android:id="@+id/transient_seek_time_elapsed"
82 android:layout_width="wrap_content"
83 android:layout_height="wrap_content"
84 android:layout_alignParentStart="true"
85 android:layout_below="@id/transient_seek_bar"
86 android:textAppearance="?android:attr/textAppearanceSmall"
87 android:textSize="12dp" />
88 <TextView
89 android:id="@+id/transient_seek_time_remaining"
90 android:layout_width="wrap_content"
91 android:layout_height="wrap_content"
92 android:layout_alignParentEnd="true"
93 android:layout_below="@id/transient_seek_bar"
94 android:textAppearance="?android:attr/textAppearanceSmall"
95 android:textSize="12dp" />
96 </RelativeLayout>
Adam Powellf8895242013-09-30 16:16:24 -070097 </FrameLayout>
Jim Miller1c188282011-08-08 22:27:58 -070098 <LinearLayout
99 android:layout_width="match_parent"
100 android:layout_height="wrap_content"
Adam Powell00298a52013-10-13 11:07:33 -0700101 android:layout_marginTop="4dp"
102 android:orientation="horizontal">
Jim Miller1c188282011-08-08 22:27:58 -0700103 <FrameLayout
104 android:layout_width="wrap_content"
105 android:layout_height="wrap_content"
106 android:layout_weight="1">
Adam Powellf8895242013-09-30 16:16:24 -0700107 <ImageButton
Jim Miller1c188282011-08-08 22:27:58 -0700108 android:id="@+id/btn_prev"
109 android:layout_width="wrap_content"
110 android:layout_height="wrap_content"
111 android:layout_gravity="center"
Jim Miller5ecd8112013-01-09 18:50:26 -0800112 android:src="@drawable/ic_media_previous"
Jim Miller1c188282011-08-08 22:27:58 -0700113 android:background="?android:attr/selectableItemBackground"
Adam Powellf8895242013-09-30 16:16:24 -0700114 android:minWidth="48dp"
115 android:minHeight="48dp"
Jim Miller5ecd8112013-01-09 18:50:26 -0800116 android:contentDescription="@string/keyguard_accessibility_transport_prev_description"/>
Jim Miller1c188282011-08-08 22:27:58 -0700117 </FrameLayout>
118 <FrameLayout
119 android:layout_width="wrap_content"
120 android:layout_height="wrap_content"
121 android:layout_weight="1">
Adam Powellf8895242013-09-30 16:16:24 -0700122 <ImageButton
Jim Miller1c188282011-08-08 22:27:58 -0700123 android:id="@+id/btn_play"
124 android:layout_width="wrap_content"
125 android:layout_height="wrap_content"
126 android:layout_gravity="center"
Jim Miller5ecd8112013-01-09 18:50:26 -0800127 android:src="@drawable/ic_media_play"
Jim Miller1c188282011-08-08 22:27:58 -0700128 android:background="?android:attr/selectableItemBackground"
Adam Powellf8895242013-09-30 16:16:24 -0700129 android:minWidth="48dp"
130 android:minHeight="48dp"
Jim Miller5ecd8112013-01-09 18:50:26 -0800131 android:contentDescription="@string/keyguard_accessibility_transport_play_description"/>
Jim Miller1c188282011-08-08 22:27:58 -0700132 </FrameLayout>
133 <FrameLayout
134 android:layout_width="wrap_content"
135 android:layout_height="wrap_content"
136 android:layout_weight="1">
Adam Powellf8895242013-09-30 16:16:24 -0700137 <ImageButton
Jim Miller1c188282011-08-08 22:27:58 -0700138 android:id="@+id/btn_next"
139 android:layout_width="wrap_content"
140 android:layout_height="wrap_content"
141 android:layout_gravity="center"
Jim Miller5ecd8112013-01-09 18:50:26 -0800142 android:src="@drawable/ic_media_next"
Jim Miller1c188282011-08-08 22:27:58 -0700143 android:background="?android:attr/selectableItemBackground"
Adam Powellf8895242013-09-30 16:16:24 -0700144 android:minWidth="48dp"
145 android:minHeight="48dp"
Jim Miller5ecd8112013-01-09 18:50:26 -0800146 android:contentDescription="@string/keyguard_accessibility_transport_next_description"/>
Jim Miller1c188282011-08-08 22:27:58 -0700147 </FrameLayout>
148 </LinearLayout>
149 </LinearLayout>
Jim Miller6b05d582011-07-18 13:09:59 -0700150
Jim Miller5ecd8112013-01-09 18:50:26 -0800151</com.android.keyguard.KeyguardTransportControlView>