The edu text is added to the bottom of the TvPipMenuView, below the
pip content. This also makes the front and back pip menu surfaces
change size while the edu text is showing. It is shown for 10 seconds
and after that it is hidden by sliding upwards. This repositions the
PiP window so that it is placed properly (centered in case of expanded
pip).
This change introduces temporary decor insets - this is for the edu
text. Temporary decor insets don't interfere with the keep-clear area
algorithm - they will not cause the pip to move if they intersect with
a keep-clear area. They are only taken into account when calculating
the anchor bounds. Permanent decor insets are also taken into account
when calculating intersecting keep-clear areas
Bug: 219884907
Test: manual - start pip and check that the edu text is displayed and
goes away after 10 seconds
Change-Id: Ie27c633c517903a4bf0b1544626bd00b621c19d4
60 lines
2.8 KiB
XML
60 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2020 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.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
|
<!-- Theme used for the activity that shows when the system forced an app to be resizable -->
|
|
<style name="ForcedResizableTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
|
|
<item name="android:windowBackground">@drawable/forced_resizable_background</item>
|
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
|
<item name="android:windowAnimationStyle">@style/Animation.ForcedResizable</item>
|
|
</style>
|
|
|
|
<style name="Animation.ForcedResizable" parent="@android:style/Animation">
|
|
<item name="android:activityOpenEnterAnimation">@anim/forced_resizable_enter</item>
|
|
|
|
<!-- If the target stack doesn't have focus, we do a task to front animation. -->
|
|
<item name="android:taskToFrontEnterAnimation">@anim/forced_resizable_enter</item>
|
|
<item name="android:activityCloseExitAnimation">@anim/forced_resizable_exit</item>
|
|
</style>
|
|
|
|
<style name="DockedDividerBackground">
|
|
<item name="android:layout_width">match_parent</item>
|
|
<item name="android:layout_height">@dimen/split_divider_bar_width</item>
|
|
<item name="android:layout_gravity">center_vertical</item>
|
|
<item name="android:background">@color/split_divider_background</item>
|
|
</style>
|
|
|
|
<style name="DockedDividerMinimizedShadow">
|
|
<item name="android:layout_width">match_parent</item>
|
|
<item name="android:layout_height">8dp</item>
|
|
</style>
|
|
|
|
<style name="DockedDividerHandle">
|
|
<item name="android:layout_gravity">center</item>
|
|
<item name="android:layout_width">96dp</item>
|
|
<item name="android:layout_height">48dp</item>
|
|
</style>
|
|
|
|
<style name="TvPipEduText">
|
|
<item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
|
|
<item name="android:textAllCaps">true</item>
|
|
<item name="android:textSize">10sp</item>
|
|
<item name="android:lineSpacingExtra">4sp</item>
|
|
<item name="android:lineHeight">16sp</item>
|
|
<item name="android:textColor">@color/tv_pip_edu_text</item>
|
|
</style>
|
|
</resources>
|