Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Xamarin Android and the Override of Pending Transitions

$
0
0

I'm trying to replace the default behavior of transitions between Activities and by far I can't reproduce the same on Xamarin Android

Turn's out that my Activities get Black and then closes the app.

I've added the following code animation under the Resources/anim

Slide In


<?xml version="1.0" encoding="UTF-8" ?>
set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"

translate
    android:duration="300"
    android:fromXDelta="0"
    android:toXDelta="100%p" 

/set

And Slide Out


<?xml version="1.0" encoding="utf-8"?>
set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/accelerate_interpolator"

    translate
        android:duration="300"
        android:fromXDelta="-100%p"
        android:toXDelta="0"

/set

On each of my Activity I override the pending Transition.

    protected override void OnStart(){
            this.OnStart();
            this.OverridePendingTransition (Resource.Animation.slideIn, Resource.Animation.slideOut);
        }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>