Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c599c90e authored by Alina Zaidi's avatar Alina Zaidi Committed by Android (Google) Code Review
Browse files

Merge "Update scrim in widget pickers." into sc-dev

parents b7cecf8a 87967071
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2021, 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.
*/
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:color="@android:color/system_neutral1_900" android:alpha="0.8" />
</selector>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2021, 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.
*/
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:color="@android:color/system_neutral1_200" android:alpha="0.8" />
</selector>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2021, 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.
*/
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="#000000" android:alpha="0.32" />
</selector>
+3 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/add_item_dialog_background"
        android:padding="24dp"
        android:paddingTop="24dp"
        android:theme="?attr/widgetsTheme"
        android:layout_gravity="bottom"
        android:orientation="vertical">
@@ -42,6 +42,7 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:paddingHorizontal="24dp"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="24sp"
            android:ellipsize="end"
@@ -53,6 +54,7 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:paddingHorizontal="24dp"
            android:paddingTop="8dp"
            android:text="@string/add_item_request_drag_hint"
            android:textSize="14sp"
+8 −5
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import com.android.launcher3.pm.PinRequestHelper;
import com.android.launcher3.util.SystemUiController;
import com.android.launcher3.views.AbstractSlideInView;
import com.android.launcher3.views.BaseDragLayer;
import com.android.launcher3.widget.AddItemWidgetsBottomSheet;
import com.android.launcher3.widget.LauncherAppWidgetHost;
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
import com.android.launcher3.widget.NavigableAppWidgetHostView;
@@ -89,6 +90,7 @@ public class AddItemActivity extends BaseActivity
    private LauncherAppState mApp;
    private InvariantDeviceProfile mIdp;
    private BaseDragLayer<AddItemActivity> mDragLayer;
    private AddItemWidgetsBottomSheet mSlideInView;

    private WidgetCell mWidgetCell;

@@ -124,8 +126,6 @@ public class AddItemActivity extends BaseActivity
        mDragLayer = findViewById(R.id.add_item_drag_layer);
        mDragLayer.recreateControllers();
        mDragLayer.setInsets(mDeviceProfile.getInsets());
        AbstractSlideInView<AddItemActivity> slideInView = findViewById(R.id.add_item_bottom_sheet);
        slideInView.addOnCloseListener(this);
        mWidgetCell = findViewById(R.id.widget_cell);

        if (mRequest.getRequestType() == PinItemRequest.REQUEST_TYPE_SHORTCUT) {
@@ -151,6 +151,9 @@ public class AddItemActivity extends BaseActivity
        TextView widgetAppName = findViewById(R.id.widget_appName);
        widgetAppName.setText(getApplicationInfo().labelRes);

        mSlideInView = findViewById(R.id.add_item_bottom_sheet);
        mSlideInView.addOnCloseListener(this);
        mSlideInView.show();
        setupNavBarColor();
    }

@@ -279,7 +282,7 @@ public class AddItemActivity extends BaseActivity
     */
    public void onCancelClick(View v) {
        logCommand(LAUNCHER_ADD_EXTERNAL_ITEM_CANCELLED);
        finish();
        mSlideInView.close(/* animate= */ true);
    }

    /**
@@ -290,7 +293,7 @@ public class AddItemActivity extends BaseActivity
            ItemInstallQueue.INSTANCE.get(this).queueItem(mRequest.getShortcutInfo());
            logCommand(LAUNCHER_ADD_EXTERNAL_ITEM_PLACED_AUTOMATICALLY);
            mRequest.accept();
            finish();
            mSlideInView.close(/* animate= */ true);
            return;
        }

@@ -313,7 +316,7 @@ public class AddItemActivity extends BaseActivity
        mWidgetOptions.putInt(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId);
        mRequest.accept(mWidgetOptions);
        logCommand(LAUNCHER_ADD_EXTERNAL_ITEM_PLACED_AUTOMATICALLY);
        finish();
        mSlideInView.close(/* animate= */ true);
    }

    @Override
Loading