blob: 7e36f9f68851aafdd6cff3ed1bca61b0f4cb3620 [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 Miller02c4c8a2011-10-17 21:05:38 -070025 <!-- FrameLayout used as scrim to show between album art and buttons -->
26 <FrameLayout
Jim Miller1c188282011-08-08 22:27:58 -070027 android:layout_width="match_parent"
28 android:layout_height="match_parent"
Jim Miller5ecd8112013-01-09 18:50:26 -080029 android:foreground="@drawable/ic_lockscreen_player_background"
30 android:contentDescription="@string/keygaurd_accessibility_media_controls">
Jim Millerff2aa0b2012-09-06 19:03:52 -070031 <!-- Use ImageView for its cropping features; otherwise could be android:background -->
Jim Miller02c4c8a2011-10-17 21:05:38 -070032 <ImageView
33 android:id="@+id/albumart"
34 android:layout_width="match_parent"
35 android:layout_height="match_parent"
36 android:layout_gravity="fill"
37 android:scaleType="centerCrop"
38 android:adjustViewBounds="false"
Jim Miller6b05d582011-07-18 13:09:59 -070039 />
Jim Miller02c4c8a2011-10-17 21:05:38 -070040 </FrameLayout>
Jim Miller6b05d582011-07-18 13:09:59 -070041
Jim Miller1c188282011-08-08 22:27:58 -070042 <LinearLayout
43 android:orientation="vertical"
44 android:layout_width="match_parent"
Jim Miller6b05d582011-07-18 13:09:59 -070045 android:layout_height="wrap_content"
Jim Miller1c188282011-08-08 22:27:58 -070046 android:layout_gravity="bottom">
47 <TextView
48 android:id="@+id/title"
49 android:layout_width="match_parent"
50 android:layout_height="wrap_content"
51 android:layout_marginTop="8dip"
Fabrice Di Meglioaac0d4e2012-07-19 19:21:26 -070052 android:layout_marginStart="16dip"
53 android:layout_marginEnd="16dip"
Jim Miller1c188282011-08-08 22:27:58 -070054 android:gravity="center_horizontal"
55 android:singleLine="true"
56 android:ellipsize="end"
57 android:textAppearance="?android:attr/textAppearanceMedium"
Jim Miller6b05d582011-07-18 13:09:59 -070058 />
Jim Miller1c188282011-08-08 22:27:58 -070059 <LinearLayout
60 android:layout_width="match_parent"
61 android:layout_height="wrap_content"
62 android:orientation="horizontal"
63 android:layout_marginTop="5dip">
64 <FrameLayout
65 android:layout_width="wrap_content"
66 android:layout_height="wrap_content"
67 android:layout_weight="1">
68 <ImageView
69 android:id="@+id/btn_prev"
70 android:layout_width="wrap_content"
71 android:layout_height="wrap_content"
72 android:layout_gravity="center"
Jim Miller5ecd8112013-01-09 18:50:26 -080073 android:src="@drawable/ic_media_previous"
Jim Miller1c188282011-08-08 22:27:58 -070074 android:clickable="true"
75 android:background="?android:attr/selectableItemBackground"
Jim Miller67e043d2011-10-10 17:48:01 -070076 android:padding="10dip"
Jim Miller5ecd8112013-01-09 18:50:26 -080077 android:contentDescription="@string/keyguard_accessibility_transport_prev_description"/>
Jim Miller1c188282011-08-08 22:27:58 -070078 </FrameLayout>
79 <FrameLayout
80 android:layout_width="wrap_content"
81 android:layout_height="wrap_content"
82 android:layout_weight="1">
83 <ImageView
84 android:id="@+id/btn_play"
85 android:layout_width="wrap_content"
86 android:layout_height="wrap_content"
87 android:layout_gravity="center"
88 android:clickable="true"
Jim Miller5ecd8112013-01-09 18:50:26 -080089 android:src="@drawable/ic_media_play"
Jim Miller1c188282011-08-08 22:27:58 -070090 android:background="?android:attr/selectableItemBackground"
Jim Miller67e043d2011-10-10 17:48:01 -070091 android:padding="10dip"
Jim Miller5ecd8112013-01-09 18:50:26 -080092 android:contentDescription="@string/keyguard_accessibility_transport_play_description"/>
Jim Miller1c188282011-08-08 22:27:58 -070093 </FrameLayout>
94 <FrameLayout
95 android:layout_width="wrap_content"
96 android:layout_height="wrap_content"
97 android:layout_weight="1">
98 <ImageView
99 android:id="@+id/btn_next"
100 android:layout_width="wrap_content"
101 android:layout_height="wrap_content"
102 android:layout_gravity="center"
103 android:clickable="true"
Jim Miller5ecd8112013-01-09 18:50:26 -0800104 android:src="@drawable/ic_media_next"
Jim Miller1c188282011-08-08 22:27:58 -0700105 android:background="?android:attr/selectableItemBackground"
Jim Miller67e043d2011-10-10 17:48:01 -0700106 android:padding="10dip"
Jim Miller5ecd8112013-01-09 18:50:26 -0800107 android:contentDescription="@string/keyguard_accessibility_transport_next_description"/>
Jim Miller1c188282011-08-08 22:27:58 -0700108 </FrameLayout>
109 </LinearLayout>
110 </LinearLayout>
Jim Miller6b05d582011-07-18 13:09:59 -0700111
Jim Miller5ecd8112013-01-09 18:50:26 -0800112</com.android.keyguard.KeyguardTransportControlView>