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

Commit dded3aa8 authored by Jaewan Kim's avatar Jaewan Kim
Browse files

PIP: Show background scrim for PIP controls in Recents

Scrim will fade in after the PIP control's focus losing animation,
and will be gone immediately when PIP control gets focus.

Bug: 28041690
Change-Id: Ibb7fa0ce15ba1af13781a1bd5e87609fefa95cc0
parent 6d1a776c
Loading
Loading
Loading
Loading
+18 −5
Original line number Diff line number Diff line
@@ -14,8 +14,21 @@
     limitations under the License.
-->

<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
<set xmlns:android="http://schemas.android.com/apk/res/android">

    <objectAnimator
        android:propertyName="translationY"
        android:valueTo="0dp"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
    <objectAnimator
        android:propertyName="scaleX"
        android:valueTo="1.0"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
    <objectAnimator
        android:propertyName="scaleY"
        android:valueTo="1.0"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
</set>
+18 −5
Original line number Diff line number Diff line
@@ -14,8 +14,21 @@
     limitations under the License.
-->

<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
<set xmlns:android="http://schemas.android.com/apk/res/android">

    <objectAnimator
        android:propertyName="translationY"
        android:valueTo="-57dp"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
    <objectAnimator
        android:propertyName="scaleX"
        android:valueTo="0.7"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
    <objectAnimator
        android:propertyName="scaleY"
        android:valueTo="0.7"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
</set>
+5 −13
Original line number Diff line number Diff line
@@ -14,16 +14,8 @@
     limitations under the License.
-->

<set xmlns:android="http://schemas.android.com/apk/res/android">

    <objectAnimator
        android:propertyName="scaleX"
        android:valueTo="1.0"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
    <objectAnimator
        android:propertyName="scaleY"
        android:valueTo="1.0"
<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="@integer/recents_tv_pip_focus_anim_duration" />
</set>
    android:duration="100" />
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
<!--
     Copyright (C) 2016 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.
@@ -13,17 +13,11 @@
     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">

<set xmlns:android="http://schemas.android.com/apk/res/android">

    <objectAnimator
        android:propertyName="scaleX"
        android:valueTo="0.7"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
    <objectAnimator
        android:propertyName="scaleY"
        android:valueTo="0.7"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:duration="@integer/recents_tv_pip_focus_anim_duration" />
</set>
    <gradient
        android:startColor="#80000000"
        android:endColor="#00000000"
        android:angle="90"/>
</shape>
+21 −4
Original line number Diff line number Diff line
@@ -16,14 +16,31 @@
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:gravity="top|center_horizontal">
    android:layout_height="wrap_content"
    android:gravity="top|center_horizontal"
    android:orientation="vertical">

    <com.android.systemui.tv.pip.PipRecentsControlsView
        android:id="@+id/pip_controls"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:clipToPadding="false">

        <View
            android:id="@+id/scrim"
            android:layout_width="160dp"
            android:layout_height="32dp"
            android:translationY="-46dp"
            android:layout_gravity="top|center_horizontal"
            android:background="@drawable/tv_pip_recents_overlay_scrim" />
        <com.android.systemui.tv.pip.PipControlsView
            android:id="@+id/pip_control_contents"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:layout_gravity="top|center_horizontal" />
    </com.android.systemui.tv.pip.PipRecentsControlsView>

    <View
        android:id="@+id/recents"
Loading