diff options
author | Winson <winsonc@google.com> | 2016-07-18 17:18:02 -0700 |
---|---|---|
committer | Winson <winsonc@google.com> | 2016-07-20 10:17:08 -0700 |
commit | 1f06427266c0cb5de4561fc7c620ff542f625300 (patch) | |
tree | 59869923b1a0affd0521eda603a85ccb64bbea53 /src/com/android/launcher3/Hotseat.java | |
parent | 5b3ace8e56988eb493a3423f9e25b29909fa50bf (diff) | |
download | android_packages_apps_Trebuchet-1f06427266c0cb5de4561fc7c620ff542f625300.tar.gz android_packages_apps_Trebuchet-1f06427266c0cb5de4561fc7c620ff542f625300.tar.bz2 android_packages_apps_Trebuchet-1f06427266c0cb5de4561fc7c620ff542f625300.zip |
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
Diffstat (limited to 'src/com/android/launcher3/Hotseat.java')
-rw-r--r-- | src/com/android/launcher3/Hotseat.java | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java index 7e2b42e49..084de70e3 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; 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 @@ public class Hotseat extends FrameLayout 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 @@ public class Hotseat extends FrameLayout 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); |