mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 09:58:08 +00:00
Add plugin settings fragment switch animation
This commit is contained in:
parent
5e71cdd636
commit
0875532d61
15
res/anim/slide_in_left.xml
Normal file
15
res/anim/slide_in_left.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/* //device/apps/common/res/anim/slide_in_left.xml
|
||||||
|
**
|
||||||
|
** SPDX-FileCopyrightText: 2007 The Android Open Source Project
|
||||||
|
**
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate android:fromXDelta="-50%p" android:toXDelta="0"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime"/>
|
||||||
|
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime" />
|
||||||
|
</set>
|
15
res/anim/slide_in_right.xml
Normal file
15
res/anim/slide_in_right.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/* //device/apps/common/res/anim/slide_in_right.xml
|
||||||
|
**
|
||||||
|
** SPDX-FileCopyrightText: 2007 The Android Open Source Project
|
||||||
|
**
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate android:fromXDelta="50%p" android:toXDelta="0"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime"/>
|
||||||
|
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime" />
|
||||||
|
</set>
|
15
res/anim/slide_out_left.xml
Normal file
15
res/anim/slide_out_left.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/* //device/apps/common/res/anim/slide_out_left.xml
|
||||||
|
**
|
||||||
|
** SPDX-FileCopyrightText: 2007 The Android Open Source Project
|
||||||
|
**
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate android:fromXDelta="0" android:toXDelta="-50%p"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime"/>
|
||||||
|
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime" />
|
||||||
|
</set>
|
15
res/anim/slide_out_right.xml
Normal file
15
res/anim/slide_out_right.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/* //device/apps/common/res/anim/slide_out_right.xml
|
||||||
|
**
|
||||||
|
** SPDX-FileCopyrightText: 2007 The Android Open Source Project
|
||||||
|
**
|
||||||
|
** SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate android:fromXDelta="0" android:toXDelta="50%p"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime"/>
|
||||||
|
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
|
||||||
|
android:duration="@android:integer/config_shortAnimTime" />
|
||||||
|
</set>
|
@ -103,6 +103,7 @@ public class PluginSettingsActivity
|
|||||||
|
|
||||||
getSupportFragmentManager()
|
getSupportFragmentManager()
|
||||||
.beginTransaction()
|
.beginTransaction()
|
||||||
|
.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left, R.anim.slide_in_left, R.anim.slide_out_right)
|
||||||
.replace(R.id.fragmentPlaceHolder, fragment)
|
.replace(R.id.fragmentPlaceHolder, fragment)
|
||||||
.addToBackStack(null)
|
.addToBackStack(null)
|
||||||
.commit();
|
.commit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user