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

Commit c3281ee1 authored by Brandon Dayauon's avatar Brandon Dayauon
Browse files

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
parent 520d91f9
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -14,9 +14,13 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>
+14 −10
Original line number Diff line number Diff line
@@ -15,8 +15,10 @@
  ~ limitations under the License.
  -->

<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:inset="4dp">
<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" />
@@ -25,3 +27,5 @@
                    android:right="@dimen/ps_lock_button_background_padding" />
            </shape>
        </inset>
    </item>
</ripple>
+2 −0
Original line number Diff line number Diff line
@@ -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);
        }
    }