From c3281ee18a7c00fcd404d050a6e4ba7a88a9cf78 Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Wed, 3 Apr 2024 14:29:32 -0700 Subject: [PATCH] Ripple to header and button when click happens bug:320701510 Test: manual video: https://drive.google.com/file/d/11X7vUetuMN1J34Now4zlQZ0WaOnryLpA/view?usp=sharing Flag: None Change-Id: Ibe22d02b59da5b1133f02ebd936520b97a63e44a --- res/drawable/bg_ps_header.xml | 16 ++++++++----- res/drawable/ps_lock_background.xml | 24 +++++++++++-------- .../allapps/PrivateProfileManager.java | 2 ++ 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/res/drawable/bg_ps_header.xml b/res/drawable/bg_ps_header.xml index 526bb5a9e8..da314452ad 100644 --- a/res/drawable/bg_ps_header.xml +++ b/res/drawable/bg_ps_header.xml @@ -14,9 +14,13 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - - - - \ No newline at end of file + + + + + + + + diff --git a/res/drawable/ps_lock_background.xml b/res/drawable/ps_lock_background.xml index b81c23fcb3..0be83dbd92 100644 --- a/res/drawable/ps_lock_background.xml +++ b/res/drawable/ps_lock_background.xml @@ -15,13 +15,17 @@ ~ limitations under the License. --> - - - - - - - \ No newline at end of file + + + + + + + + + + + diff --git a/src/com/android/launcher3/allapps/PrivateProfileManager.java b/src/com/android/launcher3/allapps/PrivateProfileManager.java index eb967bc68e..0d023ea38d 100644 --- a/src/com/android/launcher3/allapps/PrivateProfileManager.java +++ b/src/com/android/launcher3/allapps/PrivateProfileManager.java @@ -379,8 +379,10 @@ public class PrivateProfileManager extends UserProfileManager { private void addHeaderOnClickListener(RelativeLayout header) { if (getCurrentState() == STATE_DISABLED) { header.setOnClickListener(view -> lockingAction(/* lock */ false)); + header.setClickable(true); } else { header.setOnClickListener(null); + header.setClickable(false); } }