OSDN Git Service

[FRP] Transitions for lock screen setup
authorMaurice Lam <yukl@google.com>
Wed, 3 Dec 2014 23:47:49 +0000 (15:47 -0800)
committerMaurice Lam <yukl@google.com>
Thu, 4 Dec 2014 00:18:13 +0000 (16:18 -0800)
Use the slide transition for activities using the setup theme.

Bug: 18482708
Change-Id: I1a60a24f426118a63ec219bfbb378f255f362fa7

res/anim-ldrtl/slide_back_in.xml [new file with mode: 0644]
res/anim-ldrtl/slide_back_out.xml [new file with mode: 0644]
res/anim-ldrtl/slide_next_in.xml [new file with mode: 0644]
res/anim-ldrtl/slide_next_out.xml [new file with mode: 0644]
res/anim/slide_back_in.xml [new file with mode: 0644]
res/anim/slide_back_out.xml [new file with mode: 0644]
res/anim/slide_next_in.xml [new file with mode: 0644]
res/anim/slide_next_out.xml [new file with mode: 0644]
res/values/config.xml
res/values/themes.xml

diff --git a/res/anim-ldrtl/slide_back_in.xml b/res/anim-ldrtl/slide_back_in.xml
new file mode 100644 (file)
index 0000000..e5ab3e5
--- /dev/null
@@ -0,0 +1,22 @@
+<?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");
+    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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@integer/setup_wizard_transition_duration"
+    android:fromXDelta="100%"
+    android:toXDelta="0%"
+    android:interpolator="@android:anim/decelerate_interpolator"/>
diff --git a/res/anim-ldrtl/slide_back_out.xml b/res/anim-ldrtl/slide_back_out.xml
new file mode 100644 (file)
index 0000000..8717f6a
--- /dev/null
@@ -0,0 +1,22 @@
+<?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");
+    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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@integer/setup_wizard_transition_duration"
+    android:fromXDelta="0%"
+    android:toXDelta="-100%"
+    android:interpolator="@android:anim/decelerate_interpolator"/>
diff --git a/res/anim-ldrtl/slide_next_in.xml b/res/anim-ldrtl/slide_next_in.xml
new file mode 100644 (file)
index 0000000..009ea9f
--- /dev/null
@@ -0,0 +1,22 @@
+<?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");
+    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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@integer/setup_wizard_transition_duration"
+    android:fromXDelta="-100%"
+    android:toXDelta="0%"
+    android:interpolator="@android:anim/decelerate_interpolator"/>
diff --git a/res/anim-ldrtl/slide_next_out.xml b/res/anim-ldrtl/slide_next_out.xml
new file mode 100644 (file)
index 0000000..b7ab2b6
--- /dev/null
@@ -0,0 +1,22 @@
+<?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");
+    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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@integer/setup_wizard_transition_duration"
+    android:fromXDelta="0%"
+    android:toXDelta="100%"
+    android:interpolator="@android:anim/decelerate_interpolator"/>
diff --git a/res/anim/slide_back_in.xml b/res/anim/slide_back_in.xml
new file mode 100644 (file)
index 0000000..009ea9f
--- /dev/null
@@ -0,0 +1,22 @@
+<?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");
+    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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@integer/setup_wizard_transition_duration"
+    android:fromXDelta="-100%"
+    android:toXDelta="0%"
+    android:interpolator="@android:anim/decelerate_interpolator"/>
diff --git a/res/anim/slide_back_out.xml b/res/anim/slide_back_out.xml
new file mode 100644 (file)
index 0000000..b7ab2b6
--- /dev/null
@@ -0,0 +1,22 @@
+<?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");
+    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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@integer/setup_wizard_transition_duration"
+    android:fromXDelta="0%"
+    android:toXDelta="100%"
+    android:interpolator="@android:anim/decelerate_interpolator"/>
diff --git a/res/anim/slide_next_in.xml b/res/anim/slide_next_in.xml
new file mode 100644 (file)
index 0000000..e5ab3e5
--- /dev/null
@@ -0,0 +1,22 @@
+<?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");
+    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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@integer/setup_wizard_transition_duration"
+    android:fromXDelta="100%"
+    android:toXDelta="0%"
+    android:interpolator="@android:anim/decelerate_interpolator"/>
diff --git a/res/anim/slide_next_out.xml b/res/anim/slide_next_out.xml
new file mode 100644 (file)
index 0000000..8717f6a
--- /dev/null
@@ -0,0 +1,22 @@
+<?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");
+    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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:duration="@integer/setup_wizard_transition_duration"
+    android:fromXDelta="0%"
+    android:toXDelta="-100%"
+    android:interpolator="@android:anim/decelerate_interpolator"/>
index a6fd34e..f830e06 100755 (executable)
@@ -34,4 +34,7 @@
 
     <!-- Carrier_enabled editable -->
     <bool name="config_allow_edit_carrier_enabled" translatable="false">false</bool>
+
+    <!-- The duration (in milliseconds) of activity transitions -->
+    <integer name="setup_wizard_transition_duration">300</integer>
 </resources>
index d4875e2..b426c00 100644 (file)
@@ -34,6 +34,7 @@
         <item name="android:colorAccent">@color/setup_wizard_color_accent_dark</item>
         <item name="android:listPreferredItemPaddingEnd">@dimen/setup_wizard_margin_sides</item>
         <item name="android:listPreferredItemPaddingStart">@dimen/setup_wizard_margin_sides</item>
+        <item name="android:windowAnimationStyle">@style/Animation.SetupWizard</item>
         <item name="android:windowBackground">?android:attr/colorBackground</item>
         <item name="android:windowSoftInputMode">adjustPan</item>
         <item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
@@ -52,6 +53,7 @@
         <item name="android:colorAccent">@color/setup_wizard_color_accent_light</item>
         <item name="android:listPreferredItemPaddingEnd">@dimen/setup_wizard_margin_sides</item>
         <item name="android:listPreferredItemPaddingStart">@dimen/setup_wizard_margin_sides</item>
+        <item name="android:windowAnimationStyle">@style/Animation.SetupWizard</item>
         <item name="android:windowBackground">?android:attr/colorBackground</item>
         <item name="android:windowSoftInputMode">adjustPan</item>
         <item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
         <item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
     </style>
 
+    <style name="Animation.SetupWizard" parent="@android:style/Animation.Activity">
+        <item name="android:activityOpenEnterAnimation">@anim/slide_next_in</item>
+        <item name="android:activityOpenExitAnimation">@anim/slide_next_out</item>
+        <item name="android:activityCloseEnterAnimation">@anim/slide_back_in</item>
+        <item name="android:activityCloseExitAnimation">@anim/slide_back_out</item>
+    </style>
+
     <style name="Theme.WifiDialog" parent="@*android:style/Theme.Material.Dialog.Alert">
         <item name="android:windowSoftInputMode">adjustResize</item>
         <item name="ic_menu_add">@drawable/ic_menu_add_dark</item>