summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/WindowManager/Shell/shared/res/drawable/floating_dismiss_background.xml27
-rw-r--r--libs/WindowManager/Shell/shared/res/drawable/floating_dismiss_ic_close.xml26
-rw-r--r--libs/WindowManager/Shell/shared/res/values/dimen.xml20
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissViewExt.kt9
4 files changed, 78 insertions, 4 deletions
diff --git a/libs/WindowManager/Shell/shared/res/drawable/floating_dismiss_background.xml b/libs/WindowManager/Shell/shared/res/drawable/floating_dismiss_background.xml
new file mode 100644
index 000000000000..003f397ff97d
--- /dev/null
+++ b/libs/WindowManager/Shell/shared/res/drawable/floating_dismiss_background.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2024 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.
+ -->
+
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval">
+
+ <stroke
+ android:width="2dp"
+ android:color="@android:color/system_primary_fixed" />
+
+ <solid android:color="@android:color/system_primary_fixed" />
+</shape> \ No newline at end of file
diff --git a/libs/WindowManager/Shell/shared/res/drawable/floating_dismiss_ic_close.xml b/libs/WindowManager/Shell/shared/res/drawable/floating_dismiss_ic_close.xml
new file mode 100644
index 000000000000..8b133a417f79
--- /dev/null
+++ b/libs/WindowManager/Shell/shared/res/drawable/floating_dismiss_ic_close.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2024 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.
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="32dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M19.000000,6.400000l-1.400000,-1.400000 -5.600000,5.600000 -5.600000,-5.600000 -1.400000,1.400000 5.600000,5.600000 -5.600000,5.600000 1.400000,1.400000 5.600000,-5.600000 5.600000,5.600000 1.400000,-1.400000 -5.600000,-5.600000z"
+ android:fillColor="@android:color/system_on_primary_fixed"/>
+</vector>
diff --git a/libs/WindowManager/Shell/shared/res/values/dimen.xml b/libs/WindowManager/Shell/shared/res/values/dimen.xml
new file mode 100644
index 000000000000..0b1f76f5ce0e
--- /dev/null
+++ b/libs/WindowManager/Shell/shared/res/values/dimen.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright (C) 2024 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.
+ -->
+
+<resources>
+ <dimen name="floating_dismiss_icon_size">32dp</dimen>
+ <dimen name="floating_dismiss_background_size">96dp</dimen>
+</resources> \ No newline at end of file
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissViewExt.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissViewExt.kt
index 00a81727a9ac..2f0b62c20df9 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissViewExt.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissViewExt.kt
@@ -19,16 +19,17 @@ package com.android.wm.shell.bubbles
import com.android.wm.shell.R
import com.android.wm.shell.shared.bubbles.DismissView
+import com.android.wm.shell.shared.R as SharedR
fun DismissView.setup() {
setup(DismissView.Config(
dismissViewResId = R.id.dismiss_view,
- targetSizeResId = R.dimen.dismiss_circle_size,
- iconSizeResId = R.dimen.dismiss_target_x_size,
+ targetSizeResId = SharedR.dimen.floating_dismiss_background_size,
+ iconSizeResId = SharedR.dimen.floating_dismiss_icon_size,
bottomMarginResId = R.dimen.floating_dismiss_bottom_margin,
floatingGradientHeightResId = R.dimen.floating_dismiss_gradient_height,
floatingGradientColorResId = android.R.color.system_neutral1_900,
- backgroundResId = R.drawable.dismiss_circle_background,
- iconResId = R.drawable.pip_ic_close_white
+ backgroundResId = SharedR.drawable.floating_dismiss_background,
+ iconResId = SharedR.drawable.floating_dismiss_ic_close,
))
} \ No newline at end of file