Loading res/drawable/bg_celllayout.xml 0 → 100644 +35 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2015, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <transition xmlns:android="http://schemas.android.com/apk/res/android" > <item> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="#3fffffff" /> </shape> </item> <item> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="#3fffffff" /> <stroke android:width="1dp" android:color="#fff" /> </shape> </item> </transition> No newline at end of file res/drawable/bg_screenpanel.xml +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ */ --> <!-- TODO(twickham): Remove this file and the screenpanel drawables --> <transition xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/screenpanel"/> Loading res/values/config.xml +2 −2 Original line number Diff line number Diff line Loading @@ -21,12 +21,12 @@ <!-- AllApps & Launcher transitions --> <!-- The alpha of the AppsCustomize bg in spring loaded mode --> <integer name="config_workspaceScrimAlpha">55</integer> <integer name="config_workspaceScrimAlpha">30</integer> <integer name="config_allAppsTransitionTime">100</integer> <integer name="config_overviewTransitionTime">250</integer> <!-- Out of 100, the percent to shrink the workspace during spring loaded mode. --> <integer name="config_workspaceSpringLoadShrinkPercentage">80</integer> <integer name="config_workspaceSpringLoadShrinkPercentage">90</integer> <!-- Out of 100, the percent to shrink the workspace during overview mode. --> <integer name="config_workspaceOverviewShrinkPercentage">70</integer> Loading src/com/android/launcher3/CellLayout.java +5 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.TransitionDrawable; import android.os.Build; import android.os.Parcelable; Loading @@ -45,7 +46,6 @@ import android.view.ViewDebug; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; import android.view.animation.DecelerateInterpolator; import android.widget.Toast; import com.android.launcher3.BubbleTextView.BubbleTextShadowHandler; import com.android.launcher3.FolderIcon.FolderRingAnimator; Loading @@ -53,6 +53,7 @@ import com.android.launcher3.LauncherSettings.Favorites; import com.android.launcher3.accessibility.DragAndDropAccessibilityDelegate; import com.android.launcher3.accessibility.FolderAccessibilityHelper; import com.android.launcher3.accessibility.WorkspaceAccessibilityHelper; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.config.ProviderConfig; import com.android.launcher3.util.ParcelableSparseArray; import com.android.launcher3.util.Thunk; Loading Loading @@ -205,7 +206,9 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { final Resources res = getResources(); mHotseatScale = (float) grid.hotseatIconSizePx / grid.iconSizePx; mBackground = (TransitionDrawable) res.getDrawable(R.drawable.bg_screenpanel); mBackground = (TransitionDrawable) res.getDrawable( FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND ? R.drawable.bg_screenpanel : R.drawable.bg_celllayout); mBackground.setCallback(this); mBackground.setAlpha((int) (mBackgroundAlpha * 255)); Loading src/com/android/launcher3/DeviceProfile.java +4 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import android.view.ViewGroup.MarginLayoutParams; import android.widget.FrameLayout; import android.widget.LinearLayout; import com.android.launcher3.config.FeatureFlags; public class DeviceProfile { public final InvariantDeviceProfile inv; Loading Loading @@ -242,7 +244,8 @@ public class DeviceProfile { FontMetrics fm = textPaint.getFontMetrics(); cellWidthPx = iconSizePx; cellHeightPx = iconSizePx + iconDrawablePaddingPx + (int) Math.ceil(fm.bottom - fm.top); final float scaleDps = res.getDimensionPixelSize(R.dimen.dragViewScale); final float scaleDps = !FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND ? 0f : res.getDimensionPixelSize(R.dimen.dragViewScale); dragViewScale = (iconSizePx + scaleDps) / iconSizePx; // Hotseat Loading Loading
res/drawable/bg_celllayout.xml 0 → 100644 +35 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2015, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <transition xmlns:android="http://schemas.android.com/apk/res/android" > <item> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="#3fffffff" /> </shape> </item> <item> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="#3fffffff" /> <stroke android:width="1dp" android:color="#fff" /> </shape> </item> </transition> No newline at end of file
res/drawable/bg_screenpanel.xml +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ */ --> <!-- TODO(twickham): Remove this file and the screenpanel drawables --> <transition xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/screenpanel"/> Loading
res/values/config.xml +2 −2 Original line number Diff line number Diff line Loading @@ -21,12 +21,12 @@ <!-- AllApps & Launcher transitions --> <!-- The alpha of the AppsCustomize bg in spring loaded mode --> <integer name="config_workspaceScrimAlpha">55</integer> <integer name="config_workspaceScrimAlpha">30</integer> <integer name="config_allAppsTransitionTime">100</integer> <integer name="config_overviewTransitionTime">250</integer> <!-- Out of 100, the percent to shrink the workspace during spring loaded mode. --> <integer name="config_workspaceSpringLoadShrinkPercentage">80</integer> <integer name="config_workspaceSpringLoadShrinkPercentage">90</integer> <!-- Out of 100, the percent to shrink the workspace during overview mode. --> <integer name="config_workspaceOverviewShrinkPercentage">70</integer> Loading
src/com/android/launcher3/CellLayout.java +5 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.TransitionDrawable; import android.os.Build; import android.os.Parcelable; Loading @@ -45,7 +46,6 @@ import android.view.ViewDebug; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; import android.view.animation.DecelerateInterpolator; import android.widget.Toast; import com.android.launcher3.BubbleTextView.BubbleTextShadowHandler; import com.android.launcher3.FolderIcon.FolderRingAnimator; Loading @@ -53,6 +53,7 @@ import com.android.launcher3.LauncherSettings.Favorites; import com.android.launcher3.accessibility.DragAndDropAccessibilityDelegate; import com.android.launcher3.accessibility.FolderAccessibilityHelper; import com.android.launcher3.accessibility.WorkspaceAccessibilityHelper; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.config.ProviderConfig; import com.android.launcher3.util.ParcelableSparseArray; import com.android.launcher3.util.Thunk; Loading Loading @@ -205,7 +206,9 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { final Resources res = getResources(); mHotseatScale = (float) grid.hotseatIconSizePx / grid.iconSizePx; mBackground = (TransitionDrawable) res.getDrawable(R.drawable.bg_screenpanel); mBackground = (TransitionDrawable) res.getDrawable( FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND ? R.drawable.bg_screenpanel : R.drawable.bg_celllayout); mBackground.setCallback(this); mBackground.setAlpha((int) (mBackgroundAlpha * 255)); Loading
src/com/android/launcher3/DeviceProfile.java +4 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import android.view.ViewGroup.MarginLayoutParams; import android.widget.FrameLayout; import android.widget.LinearLayout; import com.android.launcher3.config.FeatureFlags; public class DeviceProfile { public final InvariantDeviceProfile inv; Loading Loading @@ -242,7 +244,8 @@ public class DeviceProfile { FontMetrics fm = textPaint.getFontMetrics(); cellWidthPx = iconSizePx; cellHeightPx = iconSizePx + iconDrawablePaddingPx + (int) Math.ceil(fm.bottom - fm.top); final float scaleDps = res.getDimensionPixelSize(R.dimen.dragViewScale); final float scaleDps = !FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND ? 0f : res.getDimensionPixelSize(R.dimen.dragViewScale); dragViewScale = (iconSizePx + scaleDps) / iconSizePx; // Hotseat Loading