Initial changes to tweak layout.
- Adding DeviceProfile callback for when the launcher layout changes due
to insets. This is necessary since there are now different layouts
depending on which side the navigation bar is on
- Consolidating hotseat and other layout into the device profile
launcher layout logic
- Making the all apps icons match the workspace icon height
- Tweaking caret drawable to draw to the bounds specified to simplify
layout in each orientation
- Fixing minor issue with page indicator shifting in landscape
- Centering overview buttons to the workspace page
Bug: 30021487
Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 7e2b42e..084de70 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -39,7 +39,7 @@
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
public class Hotseat extends FrameLayout
- implements UserEventDispatcher.LaunchSourceProvider, Insettable {
+ implements UserEventDispatcher.LaunchSourceProvider {
private CellLayout mContent;
@@ -49,9 +49,6 @@
private final boolean mHasVerticalHotseat;
@ViewDebug.ExportedProperty(category = "launcher")
- private Rect mInsets = new Rect();
-
- @ViewDebug.ExportedProperty(category = "launcher")
private int mBackgroundColor;
@ViewDebug.ExportedProperty(category = "launcher")
private ColorDrawable mBackground;
@@ -180,28 +177,6 @@
targetParent.containerType = LauncherLogProto.HOTSEAT;
}
- //Overridden so that the background color extends behind the navigation buttons.
- @Override
- public void setInsets(Rect insets) {
- int rightInset = insets.right - mInsets.right;
- int bottomInset = insets.bottom - mInsets.bottom;
- mInsets.set(insets);
- LayoutParams lp = (LayoutParams) getLayoutParams();
- if (mHasVerticalHotseat) {
- setPadding(getPaddingLeft(), getPaddingTop(),
- getPaddingRight() + rightInset, getPaddingBottom());
- if (lp.width != LayoutParams.MATCH_PARENT && lp.width != LayoutParams.WRAP_CONTENT) {
- lp.width += rightInset;
- }
- } else {
- setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(),
- getPaddingBottom() + bottomInset);
- if (lp.height != LayoutParams.MATCH_PARENT && lp.height != LayoutParams.WRAP_CONTENT) {
- lp.height += bottomInset;
- }
- }
- }
-
public void updateColor(ExtractedColors extractedColors, boolean animate) {
if (!mHasVerticalHotseat) {
int color = extractedColors.getColor(ExtractedColors.HOTSEAT_INDEX, Color.TRANSPARENT);