am 0c694dd1: am 2e502ee5: am f6c0767d: Merge "Add fragment animations to setup leanback theme" into lmp-dev

* commit '0c694dd17f128081a92efd56780f5ff8d4589315':
  Add fragment animations to setup leanback theme
This commit is contained in:
Justin Mattson
2014-08-16 00:43:28 +00:00
committed by Android Git Automerger
7 changed files with 198 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2014, 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.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:propertyName="alpha"
android:valueType="floatType"
android:valueFrom="@dimen/leanback_setup_alpha_backward_in_content_start"
android:valueTo="@dimen/leanback_setup_alpha_backward_in_content_end"
android:duration="@integer/leanback_setup_alpha_backward_in_content_duration"
android:startOffset="@integer/leanback_setup_alpha_backward_in_content_delay"/>
</set>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2014, 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.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:propertyName="alpha"
android:valueType="floatType"
android:valueFrom="@dimen/leanback_setup_alpha_backward_out_content_start"
android:valueTo="@dimen/leanback_setup_alpha_backward_out_content_end"
android:duration="@integer/leanback_setup_alpha_backward_out_content_duration"
android:startOffset="@integer/leanback_setup_alpha_backward_out_content_delay"/>
<objectAnimator
android:propertyName="x"
android:valueType="floatType"
android:valueFrom="@dimen/leanback_setup_translation_backward_out_content_start"
android:valueTo="@dimen/leanback_setup_translation_backward_out_content_end"
android:duration="@integer/leanback_setup_translation_backward_out_content_duration"
android:startOffset="@integer/leanback_setup_translation_backward_out_content_delay"/>
</set>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2014, 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.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<objectAnimator
android:propertyName="alpha"
android:valueType="floatType"
android:valueFrom="@dimen/leanback_setup_alpha_forward_in_content_start"
android:valueTo="@dimen/leanback_setup_alpha_forward_in_content_end"
android:duration="@integer/leanback_setup_alpha_forward_in_content_duration"
android:startOffset="@integer/leanback_setup_alpha_forward_in_content_delay"/>
<objectAnimator
android:propertyName="x"
android:valueType="floatType"
android:valueFrom="@dimen/leanback_setup_translation_forward_in_content_start"
android:valueTo="@dimen/leanback_setup_translation_forward_in_content_end"
android:duration="@integer/leanback_setup_translation_forward_in_content_duration"
android:startOffset="@integer/leanback_setup_translation_forward_in_content_delay" />
</set>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2014, 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.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:propertyName="alpha"
android:valueType="floatType"
android:valueFrom="@dimen/leanback_setup_alpha_forward_out_content_start"
android:valueTo="@dimen/leanback_setup_alpha_forward_out_content_end"
android:duration="@integer/leanback_setup_alpha_forward_out_content_duration"
android:startOffset="@integer/leanback_setup_alpha_forward_out_content_delay"/>
</set>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +13,74 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Default alpha value for disabled elements. -->
<item name="disabled_alpha_leanback_formwizard" format="float" type="dimen">0.2</item>
<!-- The duration of most animations related to screen content transitions -->
<integer name="leanback_setup_base_animation_duration">500</integer>
<item name="leanback_setup_alpha_animiation_max_opacity" format="float" type="dimen">1.0</item>
<item name="leanback_setup_alpha_animiation_min_opacity" format="float" type="dimen">0.0</item>
<!-- Where stable, on-screen content rests -->
<dimen name="leanback_setup_translation_content_resting_point">0dp</dimen>
<integer name="leanback_setup_translation_content_resting_point_v4">0</integer>
<!-- The screen position at which content enters/exits. If you're over the edge of the cliff, we can't see you. -->
<dimen name="leanback_setup_translation_content_cliff">100dp</dimen>
<integer name="leanback_setup_translation_content_cliff_v4">200</integer>
<!-- Opacity animation for activity background -->
<!-- The opacity of the background of the new activity background when the alpha animation starts-->
<item name="leanback_setup_alpha_activity_in_bkg_start" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_min_opacity</item>
<!-- The opacity of the background of the new activity background when the alpha animation ends-->
<item name="leanback_setup_alpha_activity_in_bkg_end" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_max_opacity</item>
<integer name="leanback_setup_alpha_activity_in_bkg_delay">0</integer>
<integer name="leanback_setup_alpha_activity_in_bkg_duration">@integer/leanback_setup_base_animation_duration</integer>
<item name="leanback_setup_alpha_activity_out_bkg_start" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_max_opacity</item>
<!-- The opacity of the background of the new activity background when the alpha animation ends-->
<item name="leanback_setup_alpha_activity_out_bkg_end" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_min_opacity</item>
<integer name="leanback_setup_alpha_activity_out_bkg_delay">0</integer>
<integer name="leanback_setup_alpha_activity_out_bkg_duration">@integer/leanback_setup_base_animation_duration</integer>
<!-- Content forward animation configuration values -->
<!-- Parameter for alpha animation of new content coming on to the screen when we're moving "forward" -->
<!-- Initial opacity of the new content that is coming on to the screen -->
<item name="leanback_setup_alpha_forward_in_content_start" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_min_opacity</item>
<item name="leanback_setup_alpha_forward_in_content_end" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_max_opacity</item>
<integer name="leanback_setup_alpha_forward_in_content_delay">0</integer>
<integer name="leanback_setup_alpha_forward_in_content_duration">@integer/leanback_setup_base_animation_duration</integer>
<item name="leanback_setup_alpha_forward_out_content_start" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_max_opacity</item>
<item name="leanback_setup_alpha_forward_out_content_end" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_min_opacity</item>
<integer name="leanback_setup_alpha_forward_out_content_delay">0</integer>
<integer name="leanback_setup_alpha_forward_out_content_duration">@integer/leanback_setup_base_animation_duration</integer>
<!-- Position animation of incoming content during a "forward" transition -->
<dimen name="leanback_setup_translation_forward_in_content_start">@dimen/leanback_setup_translation_content_cliff</dimen>
<dimen name="leanback_setup_translation_forward_in_content_start_v4">@integer/leanback_setup_translation_content_cliff_v4</dimen>
<dimen name="leanback_setup_translation_forward_in_content_end">@dimen/leanback_setup_translation_content_resting_point</dimen>
<dimen name="leanback_setup_translation_forward_in_content_end_v4">@integer/leanback_setup_translation_content_resting_point_v4</dimen>
<integer name="leanback_setup_translation_forward_in_content_delay">0</integer>
<integer name="leanback_setup_translation_forward_in_content_duration">@integer/leanback_setup_base_animation_duration</integer>
<!-- Content backward animation configuration values -->
<!-- Alpha animation values for the content that will be displayed after the transition is complete, this is the content coming in. -->
<item name="leanback_setup_alpha_backward_in_content_start" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_min_opacity</item>
<item name="leanback_setup_alpha_backward_in_content_end" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_max_opacity</item>
<integer name="leanback_setup_alpha_backward_in_content_delay">0</integer>
<integer name="leanback_setup_alpha_backward_in_content_duration">@integer/leanback_setup_base_animation_duration</integer>
<!-- Alpha animiation values for the content that is displayed when the transition starts, this is the content going away. -->
<item name="leanback_setup_alpha_backward_out_content_start" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_max_opacity</item>
<item name="leanback_setup_alpha_backward_out_content_end" format="float" type="dimen">@dimen/leanback_setup_alpha_animiation_min_opacity</item>
<integer name="leanback_setup_alpha_backward_out_content_delay">0</integer>
<integer name="leanback_setup_alpha_backward_out_content_duration">@integer/leanback_setup_base_animation_duration</integer>
<!-- Position animation for content that is displayed when the transition starts, this is the content going away. -->
<dimen name="leanback_setup_translation_backward_out_content_start">@dimen/leanback_setup_translation_content_resting_point</dimen>
<dimen name="leanback_setup_translation_backward_out_content_start_v4">@integer/leanback_setup_translation_content_resting_point_v4</dimen>
<dimen name="leanback_setup_translation_backward_out_content_end">@dimen/leanback_setup_translation_content_cliff</dimen>
<dimen name="leanback_setup_translation_backward_out_content_end_v4">@integer/leanback_setup_translation_content_cliff_v4</dimen>
<integer name="leanback_setup_translation_backward_out_content_delay">0</integer>
<integer name="leanback_setup_translation_backward_out_content_duration">@integer/leanback_setup_base_animation_duration</integer>
</resources>

View File

@@ -65,4 +65,10 @@
<item name="fontFamily">sans-serif-condensed</item>
</style>
<style name="WindowAnimationStyle.Leanback.Setup" parent="@style/Animation.Material.Activity">
<item name="android:fragmentOpenEnterAnimation">@animator/leanback_setup_fragment_open_enter</item>
<item name="android:fragmentOpenExitAnimation">@animator/leanback_setup_fragment_open_exit</item>
<item name="android:fragmentCloseEnterAnimation">@animator/leanback_setup_fragment_close_enter</item>
<item name="android:fragmentCloseExitAnimation">@animator/leanback_setup_fragment_close_exit</item>
</style>
</resources>

View File

@@ -58,5 +58,6 @@
<item name="textAppearanceListItem">@style/TextAppearance.Leanback.FormWizard.ListItem</item>
<item name="textAppearance">@style/TextAppearance.Leanback.FormWizard</item>
<item name="textColorPrimary">@color/primary_text_leanback_formwizard_dark</item>
<item name="windowAnimationStyle">@style/WindowAnimationStyle.Leanback.Setup</item>
</style>
</resources>