Skip to content

Commit 0639876

Browse files
Jim MillerAndroid (Google) Code Review
authored andcommitted
Merge "Fix 5288804: Make music trasports in lockscreen more closely match design" into ics-mr0
2 parents 4de8cb5 + 02c4c8a commit 0639876

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed
-114 Bytes
Loading
-112 Bytes
Loading
-101 Bytes
Loading

core/res/res/layout/keyguard_transport_control.xml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,28 @@
1919
but rather as include tags for this file or the layout will break. -->
2020
<com.android.internal.widget.TransportControlView
2121
xmlns:android="http://schemas.android.com/apk/res/android"
22-
android:id="@+id/transport_controls"
23-
android:background="@drawable/ic_lockscreen_player_background">
22+
android:id="@+id/transport_controls">
2423

25-
<ImageView
26-
android:id="@+id/albumart"
24+
<!-- FrameLayout used as scrim to show between album art and buttons -->
25+
<FrameLayout
2726
android:layout_width="match_parent"
2827
android:layout_height="match_parent"
29-
android:layout_gravity="fill"
30-
android:scaleType="centerCrop"
31-
android:adjustViewBounds="false"
28+
android:foreground="@drawable/ic_lockscreen_player_background">
29+
<!-- We use ImageView for its cropping features, otherwise could be android:background -->
30+
<ImageView
31+
android:id="@+id/albumart"
32+
android:layout_width="match_parent"
33+
android:layout_height="match_parent"
34+
android:layout_gravity="fill"
35+
android:scaleType="centerCrop"
36+
android:adjustViewBounds="false"
3237
/>
38+
</FrameLayout>
3339

3440
<LinearLayout
3541
android:orientation="vertical"
3642
android:layout_width="match_parent"
3743
android:layout_height="wrap_content"
38-
android:background="#c8000000"
3944
android:layout_gravity="bottom">
4045
<TextView
4146
android:id="@+id/title"

policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@
4242
import android.content.ServiceConnection;
4343
import android.graphics.Bitmap;
4444
import android.graphics.Canvas;
45+
import android.graphics.Color;
4546
import android.graphics.ColorFilter;
4647
import android.graphics.PixelFormat;
48+
import android.graphics.drawable.ColorDrawable;
4749
import android.graphics.drawable.Drawable;
4850
import android.os.Bundle;
4951
import android.os.Handler;
@@ -241,6 +243,9 @@ public void requestShow(View view) {
241243

242244
// TODO: examine all widgets to derive clock status
243245
mUpdateMonitor.reportClockVisible(false);
246+
247+
// TODO: We should disable the wallpaper instead
248+
setBackgroundColor(0xff000000);
244249
}
245250

246251
public void requestHide(View view) {
@@ -249,6 +254,7 @@ public void requestHide(View view) {
249254

250255
// TODO: examine all widgets to derive clock status
251256
mUpdateMonitor.reportClockVisible(true);
257+
setBackgroundDrawable(null);
252258
}
253259

254260
public boolean isVisible(View self) {

0 commit comments

Comments
 (0)