Add new assets for LMP preview
issue 15544569 c), d), e)
Change-Id: Ib352ef1fa7c19c3695c82f3ea31936a4b41da5aa
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 8ca8d91..a0c9c2e 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -217,6 +217,11 @@
mNormalBackground = res.getDrawable(R.drawable.screenpanel);
mActiveGlowBackground = res.getDrawable(R.drawable.screenpanel_hover);
+ if (Utilities.isLmp()) {
+ mNormalBackground = res.getDrawable(R.drawable.screenpanel_l);
+ mActiveGlowBackground = res.getDrawable(R.drawable.screenpanel_hover_l);
+ }
+
mOverScrollLeft = res.getDrawable(R.drawable.overscroll_glow_left);
mOverScrollRight = res.getDrawable(R.drawable.overscroll_glow_right);
mForegroundPadding =
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 2ac2f00..4b25433 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -150,6 +150,11 @@
TextView allAppsButton = (TextView)
inflater.inflate(R.layout.all_apps_button, mContent, false);
Drawable d = context.getResources().getDrawable(R.drawable.all_apps_button_icon);
+
+ if (Utilities.isLmp()) {
+ d = context.getResources().getDrawable(R.drawable.all_apps_button_icon_l);
+ }
+
Utilities.resizeIconDrawable(d);
allAppsButton.setCompoundDrawables(null, d, null, null);
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 9ebb997..e5a17c0 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1292,6 +1292,10 @@
}
});
widgetButton.setOnTouchListener(getHapticFeedbackTouchListener());
+ if (Utilities.isLmp()) {
+ ((TextView) widgetButton).setCompoundDrawablesWithIntrinsicBounds(0,
+ R.drawable.widget_button_l, 0, 0);
+ }
View wallpaperButton = findViewById(R.id.wallpaper_button);
wallpaperButton.setOnClickListener(new OnClickListener() {
@@ -1304,6 +1308,11 @@
});
wallpaperButton.setOnTouchListener(getHapticFeedbackTouchListener());
+ if (Utilities.isLmp()) {
+ ((TextView) wallpaperButton).setCompoundDrawablesWithIntrinsicBounds(0,
+ R.drawable.wallpaper_button_l, 0, 0);
+ }
+
View settingsButton = findViewById(R.id.settings_button);
if (hasSettings()) {
settingsButton.setOnClickListener(new OnClickListener() {
@@ -1315,6 +1324,10 @@
}
});
settingsButton.setOnTouchListener(getHapticFeedbackTouchListener());
+ if (Utilities.isLmp()) {
+ ((TextView) settingsButton).setCompoundDrawablesWithIntrinsicBounds(0,
+ R.drawable.setting_button_l, 0, 0);
+ }
} else {
settingsButton.setVisibility(View.GONE);
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) widgetButton.getLayoutParams();