Defining HomeScreenElementTheme for elements which appear on top of

wallpaper

> Using HomeScreenElementTheme for workspace items
> Fixing view inflation where wrong layout inflater was being used

Change-Id: I92e278dbfb609ad7af9c2f47351f23f03cf12049
This commit is contained in:
Sunny Goyal
2017-02-17 10:39:44 -08:00
parent 519fbdb2b3
commit 9b29ca5add
21 changed files with 47 additions and 33 deletions
+4 -5
View File
@@ -43,6 +43,7 @@ import android.util.AttributeSet;
import android.util.Log;
import android.util.Property;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewDebug;
@@ -528,8 +529,6 @@ public class Workspace extends PagedView
// Set the wallpaper dimensions when Launcher starts up
setWallpaperDimension();
setEdgeGlowColor(getResources().getColor(R.color.workspace_edge_effect_color));
}
@Override
@@ -622,7 +621,7 @@ public class Workspace extends PagedView
if (qsb == null) {
// In transposed layout, we add the QSB in the Grid. As workspace does not touch the
// edges, we do not need a full width QSB.
qsb = mLauncher.getLayoutInflater().inflate(
qsb = LayoutInflater.from(getContext()).inflate(
mLauncher.getDeviceProfile().isVerticalBarLayout()
? R.layout.qsb_container : R.layout.qsb_blocker_view,
firstPage, false);
@@ -707,7 +706,7 @@ public class Workspace extends PagedView
// Inflate the cell layout, but do not add it automatically so that we can get the newly
// created CellLayout.
CellLayout newScreen = (CellLayout) mLauncher.getLayoutInflater().inflate(
CellLayout newScreen = (CellLayout) LayoutInflater.from(getContext()).inflate(
R.layout.workspace_screen, this, false /* attachToRoot */);
newScreen.setOnLongClickListener(mLongClickListener);
newScreen.setOnClickListener(mLauncher);
@@ -725,7 +724,7 @@ public class Workspace extends PagedView
public void createCustomContentContainer() {
CellLayout customScreen = (CellLayout)
mLauncher.getLayoutInflater().inflate(R.layout.workspace_screen, this, false);
LayoutInflater.from(getContext()).inflate(R.layout.workspace_screen, this, false);
customScreen.disableDragTarget();
customScreen.disableJailContent();