mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 07:16:54 +00:00
WidgetPicker - Fix sliding scrim on add widget dialog.
Use the system dimming for standalone widget picker activity, as the system is applying a default transition. Bug: 342230362 Flag: NONE animation tweak Test: visual Change-Id: I278f8bf97acbfbfca652e1e6b616e2d2885ca92a
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
<style name="AddItemActivityTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
|
||||
<item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<!-- Add the dim background here, rather than in the activity layout as the window slides
|
||||
in from the bottom, and we don't want the scrim to slide. -->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="WidgetPickerActivityTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
|
||||
|
||||
@@ -427,6 +427,9 @@
|
||||
<item name="widgetsTheme">@style/WidgetContainerTheme</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<!-- Add the dim background here, rather than in the activity layout as the window slides
|
||||
in from the bottom, and we don't want the scrim to slide. -->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="ProxyActivityStarterTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
|
||||
|
||||
@@ -145,7 +145,10 @@ public class AddItemWidgetsBottomSheet extends AbstractSlideInView<AddItemActivi
|
||||
|
||||
@Override
|
||||
protected int getScrimColor(Context context) {
|
||||
return context.getResources().getColor(R.color.widgets_picker_scrim);
|
||||
// Don't add a scrim when using the standalone picker activity. The background dimming is
|
||||
// handled by applying dimBackground in the activity theme, so the scrim doesn't slide in
|
||||
// with the window.
|
||||
return -1;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi") // Already added API check.
|
||||
|
||||
Reference in New Issue
Block a user