Loading AndroidManifest-common.xml +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ android:value="true" /> <activity android:name="com.android.launcher3.dragndrop.AddItemActivity" android:theme="@style/AppItemActivityTheme" android:theme="@style/AddItemActivityTheme" android:excludeFromRecents="true" android:autoRemoveFromRecents="true" android:exported="true"> Loading quickstep/src/com/android/launcher3/hybridhotseat/HotseatEduDialog.java +10 −10 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ import java.util.List; * User education dialog for hybrid hotseat. Allows user to migrate hotseat items to a new page in * the workspace and shows predictions on the whole hotseat */ public class HotseatEduDialog extends AbstractSlideInView implements Insettable { public class HotseatEduDialog extends AbstractSlideInView<Launcher> implements Insettable { private static final int DEFAULT_CLOSE_DURATION = 200; protected static final int FINAL_SCRIM_BG_COLOR = 0x88000000; Loading Loading @@ -84,7 +84,7 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable mHotseatWrapper = findViewById(R.id.hotseat_wrapper); mSampleHotseat = findViewById(R.id.sample_prediction); DeviceProfile grid = mLauncher.getDeviceProfile(); DeviceProfile grid = mActivityContext.getDeviceProfile(); Rect padding = grid.getHotseatLayoutPadding(); mSampleHotseat.getLayoutParams().height = grid.cellHeightPx; Loading @@ -110,13 +110,13 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable mHotseatEduController.moveHotseatItems(); mHotseatEduController.finishOnboarding(); mLauncher.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_ACCEPT); mActivityContext.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_ACCEPT); } private void onDismiss(View v) { mHotseatEduController.showDimissTip(); mHotseatEduController.finishOnboarding(); mLauncher.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_DENY); mActivityContext.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_DENY); handleClose(true); } Loading @@ -131,12 +131,12 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable int rightInset = insets.right - mInsets.right; int bottomInset = insets.bottom - mInsets.bottom; mInsets.set(insets); if (mLauncher.getOrientation() == Configuration.ORIENTATION_PORTRAIT) { if (mActivityContext.getOrientation() == Configuration.ORIENTATION_PORTRAIT) { setPadding(leftInset, getPaddingTop(), rightInset, 0); mHotseatWrapper.setPadding(mHotseatWrapper.getPaddingLeft(), getPaddingTop(), mHotseatWrapper.getPaddingRight(), bottomInset); mHotseatWrapper.getLayoutParams().height = mLauncher.getDeviceProfile().hotseatBarSizePx + insets.bottom; mActivityContext.getDeviceProfile().hotseatBarSizePx + insets.bottom; } else { setPadding(0, getPaddingTop(), 0, 0); Loading Loading @@ -178,7 +178,7 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable } private void populatePreview(List<WorkspaceItemInfo> predictions) { for (int i = 0; i < mLauncher.getDeviceProfile().numShownHotseatIcons; i++) { for (int i = 0; i < mActivityContext.getDeviceProfile().numShownHotseatIcons; i++) { WorkspaceItemInfo info = predictions.get(i); PredictedAppIcon icon = PredictedAppIcon.createIcon(mSampleHotseat, info); icon.setEnabled(false); Loading @@ -194,13 +194,13 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable */ public void show(List<WorkspaceItemInfo> predictions) { if (getParent() != null || predictions.size() < mLauncher.getDeviceProfile().numShownHotseatIcons || predictions.size() < mActivityContext.getDeviceProfile().numShownHotseatIcons || mHotseatEduController == null) { return; } AbstractFloatingView.closeAllOpenViews(mLauncher); AbstractFloatingView.closeAllOpenViews(mActivityContext); attachToContainer(); mLauncher.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_SEEN); mActivityContext.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_SEEN); animateOpen(); populatePreview(predictions); } Loading res/layout/add_item_confirmation_activity.xml +71 −55 Original line number Diff line number Diff line Loading @@ -16,12 +16,24 @@ ** limitations under the License. */ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/add_item_confirmation" <com.android.launcher3.dragndrop.AddItemDragLayer xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/add_item_drag_layer" android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" android:clipToPadding="false" android:importantForAccessibility="no"> <com.android.launcher3.widget.AddItemWidgetsBottomSheet xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/add_item_bottom_sheet" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/add_item_dialog_background" android:padding="24dp" android:theme="?attr/widgetsTheme" android:layout_gravity="bottom" android:orientation="vertical"> <TextView Loading Loading @@ -81,4 +93,8 @@ android:onClick="onPlaceAutomaticallyClick" android:text="@string/add_to_home_screen"/> </LinearLayout> </LinearLayout> </com.android.launcher3.widget.AddItemWidgetsBottomSheet> </com.android.launcher3.dragndrop.AddItemDragLayer> res/values-night/styles.xml +3 −7 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* * Copyright (C) 2018 The Android Open Source Project * Copyright (C) 2008 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. Loading @@ -18,11 +18,7 @@ --> <resources> <style name="AppItemActivityTheme" parent="@android:style/Theme.DeviceDefault.Dialog.Alert"> <style name="AddItemActivityTheme" parent="@android:style/Theme.Translucent.NoTitleBar"> <item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item> <item name="android:windowBackground">@drawable/add_item_dialog_background</item> <item name="android:windowNoTitle">true</item> </style> </resources> res/values/styles.xml +4 −6 Original line number Diff line number Diff line Loading @@ -149,12 +149,6 @@ <style name="AppTheme.Dark.DarkMainColor" parent="@style/LauncherTheme.Dark.DarkMainColor" /> <style name="AppTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark.DarkText" /> <style name="AppItemActivityTheme" parent="@android:style/Theme.DeviceDefault.Light.Dialog.Alert"> <item name="widgetsTheme">@style/WidgetContainerTheme</item> <item name="android:windowBackground">@drawable/add_item_dialog_background</item> <item name="android:windowNoTitle">true</item> </style> <style name="HomeSettingsTheme" parent="@android:style/Theme.DeviceDefault.Settings"> <item name="android:navigationBarColor">?android:colorPrimaryDark</item> <item name="preferenceTheme">@style/HomeSettingsPreferenceTheme</item> Loading Loading @@ -291,4 +285,8 @@ <style name="Widget.DeviceDefault.Button.Rounded.Colored" parent="@android:style/Widget.DeviceDefault.Button.Colored"> <item name="android:background">@drawable/add_item_dialog_button_background</item> </style> <style name="AddItemActivityTheme" parent="@android:style/Theme.Translucent.NoTitleBar"> <item name="widgetsTheme">@style/WidgetContainerTheme</item> </style> </resources> Loading
AndroidManifest-common.xml +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ android:value="true" /> <activity android:name="com.android.launcher3.dragndrop.AddItemActivity" android:theme="@style/AppItemActivityTheme" android:theme="@style/AddItemActivityTheme" android:excludeFromRecents="true" android:autoRemoveFromRecents="true" android:exported="true"> Loading
quickstep/src/com/android/launcher3/hybridhotseat/HotseatEduDialog.java +10 −10 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ import java.util.List; * User education dialog for hybrid hotseat. Allows user to migrate hotseat items to a new page in * the workspace and shows predictions on the whole hotseat */ public class HotseatEduDialog extends AbstractSlideInView implements Insettable { public class HotseatEduDialog extends AbstractSlideInView<Launcher> implements Insettable { private static final int DEFAULT_CLOSE_DURATION = 200; protected static final int FINAL_SCRIM_BG_COLOR = 0x88000000; Loading Loading @@ -84,7 +84,7 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable mHotseatWrapper = findViewById(R.id.hotseat_wrapper); mSampleHotseat = findViewById(R.id.sample_prediction); DeviceProfile grid = mLauncher.getDeviceProfile(); DeviceProfile grid = mActivityContext.getDeviceProfile(); Rect padding = grid.getHotseatLayoutPadding(); mSampleHotseat.getLayoutParams().height = grid.cellHeightPx; Loading @@ -110,13 +110,13 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable mHotseatEduController.moveHotseatItems(); mHotseatEduController.finishOnboarding(); mLauncher.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_ACCEPT); mActivityContext.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_ACCEPT); } private void onDismiss(View v) { mHotseatEduController.showDimissTip(); mHotseatEduController.finishOnboarding(); mLauncher.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_DENY); mActivityContext.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_DENY); handleClose(true); } Loading @@ -131,12 +131,12 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable int rightInset = insets.right - mInsets.right; int bottomInset = insets.bottom - mInsets.bottom; mInsets.set(insets); if (mLauncher.getOrientation() == Configuration.ORIENTATION_PORTRAIT) { if (mActivityContext.getOrientation() == Configuration.ORIENTATION_PORTRAIT) { setPadding(leftInset, getPaddingTop(), rightInset, 0); mHotseatWrapper.setPadding(mHotseatWrapper.getPaddingLeft(), getPaddingTop(), mHotseatWrapper.getPaddingRight(), bottomInset); mHotseatWrapper.getLayoutParams().height = mLauncher.getDeviceProfile().hotseatBarSizePx + insets.bottom; mActivityContext.getDeviceProfile().hotseatBarSizePx + insets.bottom; } else { setPadding(0, getPaddingTop(), 0, 0); Loading Loading @@ -178,7 +178,7 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable } private void populatePreview(List<WorkspaceItemInfo> predictions) { for (int i = 0; i < mLauncher.getDeviceProfile().numShownHotseatIcons; i++) { for (int i = 0; i < mActivityContext.getDeviceProfile().numShownHotseatIcons; i++) { WorkspaceItemInfo info = predictions.get(i); PredictedAppIcon icon = PredictedAppIcon.createIcon(mSampleHotseat, info); icon.setEnabled(false); Loading @@ -194,13 +194,13 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable */ public void show(List<WorkspaceItemInfo> predictions) { if (getParent() != null || predictions.size() < mLauncher.getDeviceProfile().numShownHotseatIcons || predictions.size() < mActivityContext.getDeviceProfile().numShownHotseatIcons || mHotseatEduController == null) { return; } AbstractFloatingView.closeAllOpenViews(mLauncher); AbstractFloatingView.closeAllOpenViews(mActivityContext); attachToContainer(); mLauncher.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_SEEN); mActivityContext.getStatsLogManager().logger().log(LAUNCHER_HOTSEAT_EDU_SEEN); animateOpen(); populatePreview(predictions); } Loading
res/layout/add_item_confirmation_activity.xml +71 −55 Original line number Diff line number Diff line Loading @@ -16,12 +16,24 @@ ** limitations under the License. */ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/add_item_confirmation" <com.android.launcher3.dragndrop.AddItemDragLayer xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/add_item_drag_layer" android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" android:clipToPadding="false" android:importantForAccessibility="no"> <com.android.launcher3.widget.AddItemWidgetsBottomSheet xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/add_item_bottom_sheet" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/add_item_dialog_background" android:padding="24dp" android:theme="?attr/widgetsTheme" android:layout_gravity="bottom" android:orientation="vertical"> <TextView Loading Loading @@ -81,4 +93,8 @@ android:onClick="onPlaceAutomaticallyClick" android:text="@string/add_to_home_screen"/> </LinearLayout> </LinearLayout> </com.android.launcher3.widget.AddItemWidgetsBottomSheet> </com.android.launcher3.dragndrop.AddItemDragLayer>
res/values-night/styles.xml +3 −7 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* * Copyright (C) 2018 The Android Open Source Project * Copyright (C) 2008 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. Loading @@ -18,11 +18,7 @@ --> <resources> <style name="AppItemActivityTheme" parent="@android:style/Theme.DeviceDefault.Dialog.Alert"> <style name="AddItemActivityTheme" parent="@android:style/Theme.Translucent.NoTitleBar"> <item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item> <item name="android:windowBackground">@drawable/add_item_dialog_background</item> <item name="android:windowNoTitle">true</item> </style> </resources>
res/values/styles.xml +4 −6 Original line number Diff line number Diff line Loading @@ -149,12 +149,6 @@ <style name="AppTheme.Dark.DarkMainColor" parent="@style/LauncherTheme.Dark.DarkMainColor" /> <style name="AppTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark.DarkText" /> <style name="AppItemActivityTheme" parent="@android:style/Theme.DeviceDefault.Light.Dialog.Alert"> <item name="widgetsTheme">@style/WidgetContainerTheme</item> <item name="android:windowBackground">@drawable/add_item_dialog_background</item> <item name="android:windowNoTitle">true</item> </style> <style name="HomeSettingsTheme" parent="@android:style/Theme.DeviceDefault.Settings"> <item name="android:navigationBarColor">?android:colorPrimaryDark</item> <item name="preferenceTheme">@style/HomeSettingsPreferenceTheme</item> Loading Loading @@ -291,4 +285,8 @@ <style name="Widget.DeviceDefault.Button.Rounded.Colored" parent="@android:style/Widget.DeviceDefault.Button.Colored"> <item name="android:background">@drawable/add_item_dialog_button_background</item> </style> <style name="AddItemActivityTheme" parent="@android:style/Theme.Translucent.NoTitleBar"> <item name="widgetsTheme">@style/WidgetContainerTheme</item> </style> </resources>