Loading quickstep/res/layout/taskbar_all_apps.xml +4 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,10 @@ android:saveEnabled="false" android:theme="?attr/allAppsTheme"> <include layout="@layout/all_apps_bottom_sheet_background" android:visibility="gone" /> <include layout="@layout/all_apps_rv_layout" android:visibility="gone" /> Loading res/layout/all_apps.xml +4 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,10 @@ android:focusable="false" android:saveEnabled="false"> <include layout="@layout/all_apps_bottom_sheet_background" android:visibility="gone" /> <include layout="@layout/all_apps_rv_layout" android:visibility="gone" /> Loading res/layout/all_apps_bottom_sheet_background.xml 0 → 100644 +35 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2022 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. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/bottom_sheet_background" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg_all_apps_bottom_sheet"> <View android:id="@+id/bottom_sheet_handle_area" android:layout_width="match_parent" android:layout_height="34dp" /> <View android:id="@+id/bottom_sheet_handle" android:layout_width="48dp" android:layout_height="2dp" android:layout_gravity="center_horizontal" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" android:background="?android:attr/textColorSecondary" /> </FrameLayout> res/layout/secondary_launcher.xml +5 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ android:onClick="onAppsButtonClicked" /> <view class="com.android.launcher3.allapps.ActivityAllAppsContainerView" class="com.android.launcher3.allapps.SecondaryLauncherAllAppsContainerView" android:id="@+id/apps_view" android:layout_width="match_parent" android:layout_height="match_parent" Loading @@ -55,6 +55,10 @@ android:elevation="2dp" android:visibility="invisible" > <include layout="@layout/all_apps_bottom_sheet_background" android:visibility="gone" /> <include layout="@layout/all_apps_rv_layout" android:visibility="gone" /> Loading src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +13 −9 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte private AllAppsPagedView mViewPager; protected FloatingHeaderView mHeader; private View mBottomSheetBackground; private View mBottomSheetHandleArea; protected boolean mUsingTabs; private boolean mHasWorkApps; Loading Loading @@ -146,8 +148,6 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte mNavBarScrimPaint.setColor(Themes.getAttrColor(context, R.attr.allAppsNavBarScrimColor)); mAllAppsStore.addUpdateListener(this::onAppsUpdated); updateBackground(mActivityContext.getDeviceProfile()); } /** Creates the adapter provider for the main section. */ Loading Loading @@ -222,10 +222,8 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte updateBackground(dp); } private void updateBackground(DeviceProfile deviceProfile) { setBackground(deviceProfile.isTablet ? getContext().getDrawable(R.drawable.bg_all_apps_bottom_sheet) : null); protected void updateBackground(DeviceProfile deviceProfile) { mBottomSheetBackground.setVisibility(deviceProfile.isTablet ? View.VISIBLE : View.GONE); } private void onAppsUpdated() { Loading Loading @@ -253,7 +251,9 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte if (!mActivityContext.getDragLayer().isEventOverView(this, ev)) { return true; } // TODO(b/216203409) Support dragging down from bottom sheet divider, if present. if (mActivityContext.getDragLayer().isEventOverView(mBottomSheetHandleArea, ev)) { return true; } AllAppsRecyclerView rv = getActiveRecyclerView(); if (rv == null) { return true; Loading Loading @@ -375,6 +375,11 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte mHeader = findViewById(R.id.all_apps_header); rebindAdapters(true /* force */); mBottomSheetBackground = findViewById(R.id.bottom_sheet_background); updateBackground(mActivityContext.getDeviceProfile()); mBottomSheetHandleArea = findViewById(R.id.bottom_sheet_handle_area); } @Override Loading @@ -392,7 +397,6 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte } MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams(); mlp.topMargin = grid.isTablet ? insets.top : 0; int leftRightMargin = grid.allAppsLeftRightMargin; mlp.leftMargin = insets.left + leftRightMargin; mlp.rightMargin = insets.right + leftRightMargin; Loading @@ -401,7 +405,7 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte if (grid.isVerticalBarLayout()) { setPadding(grid.workspacePadding.left, 0, grid.workspacePadding.right, 0); } else { setPadding(0, 0, 0, 0); setPadding(0, grid.isTablet ? insets.top : 0, 0, 0); } InsettableFrameLayout.dispatchInsets(this, insets); Loading Loading
quickstep/res/layout/taskbar_all_apps.xml +4 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,10 @@ android:saveEnabled="false" android:theme="?attr/allAppsTheme"> <include layout="@layout/all_apps_bottom_sheet_background" android:visibility="gone" /> <include layout="@layout/all_apps_rv_layout" android:visibility="gone" /> Loading
res/layout/all_apps.xml +4 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,10 @@ android:focusable="false" android:saveEnabled="false"> <include layout="@layout/all_apps_bottom_sheet_background" android:visibility="gone" /> <include layout="@layout/all_apps_rv_layout" android:visibility="gone" /> Loading
res/layout/all_apps_bottom_sheet_background.xml 0 → 100644 +35 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2022 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. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/bottom_sheet_background" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg_all_apps_bottom_sheet"> <View android:id="@+id/bottom_sheet_handle_area" android:layout_width="match_parent" android:layout_height="34dp" /> <View android:id="@+id/bottom_sheet_handle" android:layout_width="48dp" android:layout_height="2dp" android:layout_gravity="center_horizontal" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" android:background="?android:attr/textColorSecondary" /> </FrameLayout>
res/layout/secondary_launcher.xml +5 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ android:onClick="onAppsButtonClicked" /> <view class="com.android.launcher3.allapps.ActivityAllAppsContainerView" class="com.android.launcher3.allapps.SecondaryLauncherAllAppsContainerView" android:id="@+id/apps_view" android:layout_width="match_parent" android:layout_height="match_parent" Loading @@ -55,6 +55,10 @@ android:elevation="2dp" android:visibility="invisible" > <include layout="@layout/all_apps_bottom_sheet_background" android:visibility="gone" /> <include layout="@layout/all_apps_rv_layout" android:visibility="gone" /> Loading
src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +13 −9 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte private AllAppsPagedView mViewPager; protected FloatingHeaderView mHeader; private View mBottomSheetBackground; private View mBottomSheetHandleArea; protected boolean mUsingTabs; private boolean mHasWorkApps; Loading Loading @@ -146,8 +148,6 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte mNavBarScrimPaint.setColor(Themes.getAttrColor(context, R.attr.allAppsNavBarScrimColor)); mAllAppsStore.addUpdateListener(this::onAppsUpdated); updateBackground(mActivityContext.getDeviceProfile()); } /** Creates the adapter provider for the main section. */ Loading Loading @@ -222,10 +222,8 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte updateBackground(dp); } private void updateBackground(DeviceProfile deviceProfile) { setBackground(deviceProfile.isTablet ? getContext().getDrawable(R.drawable.bg_all_apps_bottom_sheet) : null); protected void updateBackground(DeviceProfile deviceProfile) { mBottomSheetBackground.setVisibility(deviceProfile.isTablet ? View.VISIBLE : View.GONE); } private void onAppsUpdated() { Loading Loading @@ -253,7 +251,9 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte if (!mActivityContext.getDragLayer().isEventOverView(this, ev)) { return true; } // TODO(b/216203409) Support dragging down from bottom sheet divider, if present. if (mActivityContext.getDragLayer().isEventOverView(mBottomSheetHandleArea, ev)) { return true; } AllAppsRecyclerView rv = getActiveRecyclerView(); if (rv == null) { return true; Loading Loading @@ -375,6 +375,11 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte mHeader = findViewById(R.id.all_apps_header); rebindAdapters(true /* force */); mBottomSheetBackground = findViewById(R.id.bottom_sheet_background); updateBackground(mActivityContext.getDeviceProfile()); mBottomSheetHandleArea = findViewById(R.id.bottom_sheet_handle_area); } @Override Loading @@ -392,7 +397,6 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte } MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams(); mlp.topMargin = grid.isTablet ? insets.top : 0; int leftRightMargin = grid.allAppsLeftRightMargin; mlp.leftMargin = insets.left + leftRightMargin; mlp.rightMargin = insets.right + leftRightMargin; Loading @@ -401,7 +405,7 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte if (grid.isVerticalBarLayout()) { setPadding(grid.workspacePadding.left, 0, grid.workspacePadding.right, 0); } else { setPadding(0, 0, 0, 0); setPadding(0, grid.isTablet ? insets.top : 0, 0, 0); } InsettableFrameLayout.dispatchInsets(this, insets); Loading