mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
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
This commit is contained in:
@@ -14,9 +14,13 @@
|
||||
~ 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="rectangle">
|
||||
<corners android:radius="@dimen/ps_container_corner_radius" />
|
||||
<solid android:color="?attr/materialColorSurfaceContainerHigh" />
|
||||
</shape>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/accent_ripple_color">
|
||||
<item>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/ps_container_corner_radius" />
|
||||
<solid android:color="?attr/materialColorSurfaceContainerHigh" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
||||
@@ -15,13 +15,17 @@
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:inset="4dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@dimen/ps_lock_corner_radius" />
|
||||
<solid android:color="?attr/materialColorPrimaryFixedDim" />
|
||||
<padding
|
||||
android:left="@dimen/ps_lock_button_background_padding"
|
||||
android:right="@dimen/ps_lock_button_background_padding" />
|
||||
</shape>
|
||||
</inset>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/accent_ripple_color">
|
||||
<item>
|
||||
<inset android:inset="4dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="@dimen/ps_lock_corner_radius" />
|
||||
<solid android:color="?attr/materialColorPrimaryFixedDim" />
|
||||
<padding
|
||||
android:left="@dimen/ps_lock_button_background_padding"
|
||||
android:right="@dimen/ps_lock_button_background_padding" />
|
||||
</shape>
|
||||
</inset>
|
||||
</item>
|
||||
</ripple>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user