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

Commit 1e59f241 authored by Jaewan Kim's avatar Jaewan Kim
Browse files

PIP: Implement focus change animation in PIP control buttons

This includes following animation.
  - Fix focus change animation duration among the PIP control buttons
  - Apply ripple animation for PIP control buttons
  - PIP menu enter/exit animation.

Bug: 27677096
Change-Id: I2f992416efc8a0994eeb56d5dec00201fd08a7aa
parent cf45224a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,4 +18,4 @@
    android:propertyName="alpha"
    android:valueTo="1"
    android:interpolator="@android:interpolator/fast_out_slow_in"
    android:duration="@integer/recents_tv_pip_focus_anim_duration" />
    android:duration="100" />
+1 −1
Original line number Diff line number Diff line
@@ -18,4 +18,4 @@
    android:propertyName="alpha"
    android:valueTo="0"
    android:interpolator="@android:interpolator/fast_out_slow_in"
    android:duration="@integer/recents_tv_pip_focus_anim_duration" />
    android:duration="100" />
+21 −0
Original line number Diff line number Diff line
@@ -14,25 +14,8 @@
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android"
    android:constantSize="true">
    <item android:state_focused="true">
        <layer-list>
            <item android:drawable="@drawable/tv_pip_button_focused" />
            <item android:drawable="@drawable/ic_close_white"
                android:top="@dimen/tv_pip_button_icon_padding"
                android:bottom="@dimen/tv_pip_button_icon_padding"
                android:left="@dimen/tv_pip_button_icon_padding"
                android:right="@dimen/tv_pip_button_icon_padding" />
        </layer-list>
    </item>
    <item>
        <layer-list>
            <item android:drawable="@drawable/ic_close_white"
                android:top="@dimen/tv_pip_button_icon_padding"
                android:bottom="@dimen/tv_pip_button_icon_padding"
                android:left="@dimen/tv_pip_button_icon_padding"
                android:right="@dimen/tv_pip_button_icon_padding" />
        </layer-list>
    </item>
</selector>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
    android:propertyName="alpha"
    android:valueTo="1"
    android:interpolator="@android:interpolator/fast_out_slow_in"
    android:duration="100" />
+21 −0
Original line number Diff line number Diff line
@@ -14,25 +14,8 @@
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android"
    android:constantSize="true">
    <item android:state_focused="true">
        <layer-list>
            <item android:drawable="@drawable/tv_pip_button_focused" />
            <item android:drawable="@drawable/ic_pause_white_24dp"
                android:top="@dimen/tv_pip_button_icon_padding"
                android:bottom="@dimen/tv_pip_button_icon_padding"
                android:left="@dimen/tv_pip_button_icon_padding"
                android:right="@dimen/tv_pip_button_icon_padding" />
        </layer-list>
    </item>
    <item>
        <layer-list>
            <item android:drawable="@drawable/ic_pause_white_24dp"
                android:top="@dimen/tv_pip_button_icon_padding"
                android:bottom="@dimen/tv_pip_button_icon_padding"
                android:left="@dimen/tv_pip_button_icon_padding"
                android:right="@dimen/tv_pip_button_icon_padding" />
        </layer-list>
    </item>
</selector>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
    android:propertyName="alpha"
    android:valueTo="0"
    android:interpolator="@android:interpolator/fast_out_slow_in"
    android:duration="100" />
+2 −8
Original line number Diff line number Diff line
@@ -14,11 +14,5 @@
     limitations under the License.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <size
        android:width="34dp"
        android:height="34dp" />
    <solid
        android:color="#4DFFFFFF" />
</shape>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="#9AFFFFFF" android:radius="17dp" />
Loading