Include seamless rotation mode in API Demo.

Test: Try the RotationAnimation activity of API demos.
Change-Id: I4f3aba54d310ecbe06776190a4096c71fdf85d24
This commit is contained in:
Robert Carr
2016-10-17 17:05:38 -07:00
parent d0d2326d0c
commit 3ca1a928a4
3 changed files with 9 additions and 0 deletions

View File

@@ -69,6 +69,11 @@
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:text="@string/rotation_animation_jumpcut" android:text="@string/rotation_animation_jumpcut"
/> />
<RadioButton
android:id="@+id/seamless"
android:layout_marginStart="6dp"
android:text="@string/rotation_animation_seamless"
/>
</RadioGroup> </RadioGroup>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -1308,6 +1308,7 @@
<string name="rotation_animation_rotate">ROTATE</string> <string name="rotation_animation_rotate">ROTATE</string>
<string name="rotation_animation_crossfade">XFADE</string> <string name="rotation_animation_crossfade">XFADE</string>
<string name="rotation_animation_jumpcut">JUMPCUT</string> <string name="rotation_animation_jumpcut">JUMPCUT</string>
<string name="rotation_animation_seamless">SEAMLESS</string>
<string name="scroll_view_1_text_1">Text View 1</string> <string name="scroll_view_1_text_1">Text View 1</string>
<string name="scroll_view_1_button_1">Button 1</string> <string name="scroll_view_1_button_1">Button 1</string>
<string name="scroll_view_1_text_2">Text View 2</string> <string name="scroll_view_1_text_2">Text View 2</string>

View File

@@ -64,6 +64,9 @@ public class RotationAnimation extends Activity {
case R.id.jumpcut: case R.id.jumpcut:
mRotationAnimation = LayoutParams.ROTATION_ANIMATION_JUMPCUT; mRotationAnimation = LayoutParams.ROTATION_ANIMATION_JUMPCUT;
break; break;
case R.id.seamless:
mRotationAnimation = LayoutParams.ROTATION_ANIMATION_SEAMLESS;
break;
} }
setRotationAnimation(mRotationAnimation); setRotationAnimation(mRotationAnimation);
} }