Giter VIP home page Giter VIP logo

xamarin.plugin.sharedtransitions's Introduction

Xamarin.Plugin.SharedTransitions

Activate shared element transitions between pages in Xamarin.Forms (IOS/Android)

NuGet License

What is a shared element transition?

Shared element transitions are animations connecting common elements from one page to another.
A shared element transition determines how elements that are present in two pages transition between them. For example, an image that is displayed on both Page A and Page B, transitions from A to B when B becomes visible.

      

Setup

Platform Support

Platform Version
Xamarin.iOS iOS 9+
Xamarin.Android API 21+
Android X (Xamarin.Forms 4.5+) API 29

Documentation (wiki)

New Sample apps!

The sample apps have been completely rewritten: you can find examples for images & layouts, as well as dynamic examples (for both listview with DataTemplateSelector & collectionview). Every example is available in standard pages, tabbed, master detail and shell.

The main app is made with Prism and it sports the superawesome PancakeView and FFImageLoading plugins!

Note: Yes my dog is supercute and deserve her sample app :D

Copyright and license

Code released under the MIT license, see license file.

xamarin.plugin.sharedtransitions's People

Contributors

giampaologabba avatar jsuarezruiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamarin.plugin.sharedtransitions's Issues

Crash when the image does not exist.

Bug Information

Version Number of Plugin: 2.0.1
Device Tested On: iPhone X
Simulator Tested On: iPhone X
Version of VS: 8.2.3
Version of Xamarin: 12.14.0.114
Versions of other things you are using:

Steps to reproduce the Behavior

Create Image and set image does not exist (local or remote).

Expected Behavior

No crash. And continue the animation.

Actual Behavior

Crash.

Error

System.NullReferenceException: Object reference not set to an instance of an object
at Plugin.SharedTransitions.Platforms.iOS.ViewExtensions.GetImageFrame (UIKit.UIImageView imageView)

[Question] Does this work with PopupPage?

Before I give this a stab - wanted to ask the question first: can these transitions be used between a regular Page and a PopupPage (e.g. Prism.Plugin.Popups [which relies on Rg.Plugins.Popups])?

Please let me know if anyone has done this successfully, thank you.

Does it work with Master Detail pages ?

Bug Information

Version Number of Plugin: 2.0.2
Simulator Tested On: Android 7.1
Version of VS: 16.4.3
Version of Xamarin: 3.6.0.709228
Prism.DryIoc.Forms 7.2.0.1422

Steps to reproduce the Behavior

While using Prism, if I navigate to "/MasterDetailPage/SharedTransitionNavigationPage/SomePage", and then transition to another page using NavigationService.NavigateTo("SomeOtherPage"), the shared transitions between SomePage and SomeOtherPage won't work. However, they work if I navigate to "/SharedTransitionNavigationPage/SomePage" and then call NavigationService.NavigateTo("SomeOtherPage").

Can you tell if I'm doing something wrong, or missing a step to make it work?
Thanks

[Enhancement] Allow wrapping TabbedPages in one SharedNavigationPage instead of wrapping the individual pages.

I currently can't get the following code to work and I would like to spark a discussion about this.
I don't know, if my request is even possible but if it's not I'd like to get an explanation as to why.

xaml tabbed page

<TabbedPage.Children>
        <Page1 Title="Page1">
        </Page1>
        <Page2 Title="Page2">
        </Page2>
</TabbedPage.Children>

navigation

await NavigationService.NavigateAsync("SharedTransitionNavigationPage/TabbedPage");

navigation stack

SharedTransitionNavigationPage/TabbedPage?selectedTab=Page1/Page2

Current State

Currently the navigation and transition happen inside the TabbedPage.
The navigation stack looks like this:

TabbedPage?selectedTab=SharedTransitionNavigationPage/Page1/Page2

Desired State

Allow the navigation and transition happen outside the TabbedPage.
The navigation stack would look like this:

SharedTransitionNavigationPage/TabbedPage?selectedTab=Page1/Page2

Justifications

This would allow deep-linking without having to worry about putting a NavigationPage in the right place.
Also, this would clean the code inside the TabbedPage.

Thanks in advance! :)

[Bug] .NETstandart 2.0 Unable to make the shared transition animation appear

Bug Information

Unable to make animation appear, I still got the native navigation with Slide effect on IOS and Fade effect on Android.

Steps to reproduce the Behavior

I tried to load the repository even if I build the sharedTransition project , I got a :
"SharedTransitions/bin/Debug/netstandard2.0/Plugin.SharedTransitions.dll' could not be found"

Cause the sharedTransition project got a .netstandarLibrairy to 1.6.1 and the sample got 2.0.3.

Looks awesome anyway 👍

I'm on Mac with last Xamarin.forms Release.
Regards,

Circle images

Has anyone found a way to get this to work with circle images?

I've got something like this:

<Frame CornerRadius="20">
  <Image />
</Frame>

If you place the sharedTransitions:Transition.Name on the Image then the image will transition as a square. If you place it on the Frame then it transitions as a circle, but with a black background instead of the image background.

Either way it looks funny.

I've also tried it with Syncfusions SfBadgeView and it operates the same was as the Frame (as a circle with a solid black background).

Crash on ShellGoToAsync(../) in Android with Xamarin latest version

When using SharedTransistion inside shell (<sharedTransitions:SharedTransitionShell) going back from any page causes an exception with message. No view found for id for fragment Shell Fragment Container even if the current page does not have any shared transition usage just replaced Shell with sharedTransitions:SharedTransitionShell

Exception message :: No view found for id for fragment Shell Fragment Container

When I removed SharedTransition back navigation works fine. Also It only crashes on Android,iOS works fine.

Xamarin.Forms version : Latest
Xamarin.Plugin.SharedTransitions : Latest

samples and future development

I just recently started using your Nuget however i'm facing problems using the "Advanced shared transitions".
Could you give us an update if you are still maintaining this project?
And if so, can you provide a sample for the advanced transitions?

Thanks in advance! :)

Can it work with Shell GoToAsync() ?

Expected Behavior

When navigating between pages using Shell.Current.GoToAsync(), there should be a transition as specified.

Actual Behavior

The navigation isn't animated and just cuts from one page to another.

Shell : PopToRootAsync crashes - No view found for id

Hi,

I think I found an issue with your plugin. When I use the Shell with PopToRootAsync() method, an unhandled exception is thrown.

I use the sample project in your github repo and I only add a button on navigated page (ImageSampleTo.xaml). I call Navigation.PopToRootAsync() when I click on this button, I have the exception.

Please see the bug detailed bellow and let me know if you need more information.

Thanks for your help.

Bug Information

Version Number of Plugin: 2.30
Device Tested On:
Simulator Tested On: Simulator Android Pixel 2 Pie 9.0 (API 28)
Version of VS: Microsoft Visual Studio Professional 2019 - Version 16.7.2
Version of Xamarin: 4.6.0.1141

Steps to reproduce the Behavior

I use the defaut sample projet and into the ImageSampleTo.Xaml, I add button with click execute PopToRootAsync.

Expected Behavior

Go the the root page

Actual Behavior

Exception unhandled : Java.Lang.IllegalArgumentException: 'No view found for id 0x2 (unknown) for fragment ShellFragmentContainer{1fe5070 #0 id=0x2 android:switcher:2:664218702}'

Code snippet

ImageSampleTo.xaml

<ContentPage  xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:sharedTransitions="clr-namespace:Plugin.SharedTransitions;assembly=Plugin.SharedTransitions"
             x:Class="TransitionShellApp.Views.ImageSampleTo" Title="Image sample">
    <ScrollView>
        <StackLayout Spacing="20" Padding="10">
            <Image Source="what_the_dog.jpg" sharedTransitions:Transition.Name="WhatTheDog" HeightRequest="250" />
            <!-- Changed aspect proportion -->
            <Image Source="christmas_dog.jpg" sharedTransitions:Transition.Name="ChristmasDog" WidthRequest="330" HeightRequest="150" Aspect="Fill" />
            <Image Source="cute_dog.jpg" sharedTransitions:Transition.Name="CuteDog" />

            <Button Text="PopToRoot" Clicked="Button_Clicked"/>
        </StackLayout>
    </ScrollView>
</ContentPage>

ImageSampleTo.xaml.cs

namespace TransitionShellApp.Views
{
    public partial class ImageSampleTo : ContentPage
    {
        public ImageSampleTo()
        {
            InitializeComponent();
        }
        private async void Button_Clicked(object sender, EventArgs e)
        {
            await Navigation.PopToRootAsync();
        }
    }
}

NullReferenceException on iOS

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

StackTrace: at Plugin.SharedTransitions.Platforms.iOS.Renderes.SharedTransitionPageRenderer.Dispose

Version Number of Plugin: latest
Device Tested On: iPhone 6s and iPhone 8
Version of VS: latest
Version of Xamarin: latest stable

This is just happening when performing some normal navigation that works fine on Android.
If I'm being stupid can somebody let me know ASAP I have a tight deadline on this project.
Will disable the library for now while I do other testing.
If it's an error with the library can we have a fix ASAP please.
Sorry, bit stressed atm.

Is this project still active?

I stumbled over the repo some days ago, and wanting to use this. But it seems that there are no recent activity code wise at least? And Shell seems to be unsupported, so this will just be the initial leading question.

Is this project still active?

Does not work with ff:CachedImage ?

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

Animation doesn't happen with ff:cachedImage element
Version Number of Plugin:
Device Tested On:
Simulator Tested On:
Version of VS:
Version of Xamarin:
Versions of other things you are using:

Steps to reproduce the Behavior

Expected Behavior

Actual Behavior

Code snippet

Screenshots

SharedTransition Tabbed page within MasterDetail page

Hi, I'm using the sample app (TransitionApp) to try out different scenarios.
Now I'm trying to work with a Tabbed page within a MasterDetail page.
I have modified the MainMasterDetailPage file changing the Detail page:

`

<MasterDetailPage.Master>
    <ContentPage Title="Menu">
        <StackLayout Padding="20" VerticalOptions="Center">
            
            <Button Text="Images" Command="{prism:NavigateTo 'SharedTransitionNavigationPage/ImageFromPage'}" />
            <Button Text="Layouts" Command="{prism:NavigateTo 'SharedTransitionNavigationPage/LayoutFromPage'}" />
            <Button Text="Listview" Command="{prism:NavigateTo 'SharedTransitionNavigationPage/ListViewFromPage'}" />
            <Button Text="Collectionview" Command="{prism:NavigateTo 'SharedTransitionNavigationPage/CollectionviewFromPage'}" />
            <Button Text="Back to main Home" Command="{prism:NavigateTo '/HomePage'}" />
        </StackLayout>
    </ContentPage>
</MasterDetailPage.Master>


<!--<MasterDetailPage.Detail>
    <main:MainTabbedPage/>
</MasterDetailPage.Detail>-->

<MasterDetailPage.Detail>
    <sharedTransitions:SharedTransitionNavigationPage>
        <x:Arguments>
            <main:MainTabbedPage/>
        </x:Arguments>
    </sharedTransitions:SharedTransitionNavigationPage>
</MasterDetailPage.Detail>

`

(MainTabbedPage has not been modified)
But this is not working even if I put the MainTabbedPage within a SharedTransitionNavigationPage. Am I doing something wrong?

Thanks

Fade transition different Push/Pop

Bug Information

Version Number of Plugin: 2.0.1
Device Tested On: iPhone X
Simulator Tested On: iPhone X
Version of VS: 8.2.3
Version of Xamarin: 12.14.0.114
Versions of other things you are using:

Expected Behavior

Animation between the buttons.
Pop will be the same as Push (between controls).

Actual Behavior

Button does not occur Animation (in case of Fade test).
Pop doesn't have the same fluidity as Push.

Code snippet

using System;
using Plugin.SharedTransitions;
using Xamarin.Forms;

namespace test
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();

            MainPage = new SharedTransitionNavigationPage(new Page1());
        }
    }

    public class Page1 : ContentPage
    {
        public Page1()
        {
            SharedTransitionNavigationPage.SetBackgroundAnimation(this, BackgroundAnimation.Fade);
            SharedTransitionNavigationPage.SetTransitionDuration(this, 2000);

            Title = "Home";

            var button = new Button()
            {
                Text = "BT",
                FontSize = 20,
                WidthRequest = 40,
                TextColor = Color.White,
                BackgroundColor = Color.Blue,
                VerticalOptions = LayoutOptions.FillAndExpand
            };

            button.Clicked += Button_Clicked;

            var label = new Label()
            {
                Text = "Test Home",
                FontSize = 20,
                TextColor = Color.White,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalTextAlignment = TextAlignment.Center,
                VerticalTextAlignment = TextAlignment.Center
            };

            Transition.SetName(button, "bt");
            Transition.SetName(label, "lb");

            Content = new StackLayout()
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Start,
                BackgroundColor = Color.Red,
                Orientation = StackOrientation.Horizontal,
                HeightRequest = 40,
                Margin = 40,
                Children =
                {
                    button,
                    label
                }
            };
        }

        private void Button_Clicked(object sender, EventArgs e)
        {
            Navigation.PushAsync(new Page2());
        }
    }

    public class Page2 : ContentPage
    {
        public Page2()
        {
            SharedTransitionNavigationPage.SetBackgroundAnimation(this, BackgroundAnimation.Fade);
            SharedTransitionNavigationPage.SetTransitionDuration(this, 2000);

            Title = "Page 2...";

            var button = new Button()
            {
                Text = "BK",
                FontSize = 20,
                WidthRequest = 40,
                TextColor = Color.White,
                BackgroundColor = Color.Blue,
                VerticalOptions = LayoutOptions.FillAndExpand
            };

            button.Clicked += Button_Clicked;

            var label = new Label()
            {
                Text = "Page 2 Test",
                FontSize = 20,
                TextColor = Color.White,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalTextAlignment = TextAlignment.Center,
                VerticalTextAlignment = TextAlignment.Center
            };

            Transition.SetName(button, "bt");
            Transition.SetName(label, "lb");

            Content = new StackLayout()
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Start,
                BackgroundColor = Color.Red,
                Orientation = StackOrientation.Horizontal,
                HeightRequest = 40,
                Margin = 40,
                Children =
                {
                    button,
                    label
                }
            };
        }

        private void Button_Clicked(object sender, EventArgs e)
        {
            Navigation.PopAsync();
        }
    }
}

Screenshots

ezgif-2-9c44ec9136b9

TransitionListenerAdapter and NavigationTransitionListener classes not found exception with v2.3

Bug Information

Version Number of Plugin: 2.3
Device Tested On: Multiple Android devices ≤ API 25
Simulator Tested On: Multiple Android simulators ≤ API 25
Version of Xamarin: 4.8

Steps to reproduce the Behavior

Just use the package on an Android device running an Anroid API lower than 26, version where the missing class was added.
Devices running API 26 onwards have no issues.

Expected Behavior

No exceptions, like in version 2.2 an prior. Rollbacking to version 2.2 fixes the problem.

Actual Behavior

Starting from version 2.3, the following exception occurs and the app crashes : https://gist.github.com/toverux/c6cb85da2f41cb0fc64a574632360087

[Suggestion] CurrentTransition property

I finally got around to checking out the update you made on transition events. It's looking great!
I had an idea for a simple addition: A property on SharedTransitionNavigationPage where you put the current transition event args. So on transition start, set it. On transition cancel or finished, set it to null.

Basically, I would use it to check if it's null to see if there's a transition in progress right now. So for my need, it could as well be a boolean, but hey, someone else might need the extra info.

It's quite easy to just subclass SharedTransitionNavigationPage and implement it myself. And that's also how I will handle it right now. Just thought it could be a useful addition. I can make a PR if you want.

Failed to lookup the required marshalling information

Bug Information

Version Number of Plugin: 2.1.0
Device Tested On: iPhone
Simulator Tested On: iPhone 11,( 13.4)
Version of VS: 8.5.2
Version of Xamarin: 4.5.0.617
Versions of other things you are using:

Steps to reproduce the Behavior

  • Run NavigationPage Sample app
  • Standard Demo => Images => Tap To Navigate
  • Click back button it will give the following error

ObjCRuntime.RuntimeException: Failed to lookup the required marshalling information.
Additional information:
Selector: stopAnimating
Type: Xamarin_Forms_Platform_iOS_FormsUIImageView
---> ObjCRuntime.RuntimeException: Failed to get the 'this' instance in a method call to Xamarin.Forms.Platform.iOS.FormsUIImageView.StopAnimating. ---> ObjCRuntime.RuntimeException: Failed to marshal the Objective-C object 0x7ff67a4693b0 (type: Xamarin_Forms_Platform_iOS_FormsUIImageView). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'Xamarin.Forms.Platform.iOS.FormsUIImageView' does not have a constructor that takes one IntPtr argument).
at ObjCRuntime.Runtime.MissingCtor (System.IntPtr ptr, System.IntPtr klass, System.Type type, ObjCRuntime.Runtime+MissingCtorResolution resolution) [0x00039] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:1100
at ObjCRuntime.Runtime.ConstructNSObject[T] (System.IntPtr ptr, System.Type type, ObjCRuntime.Runtime+MissingCtorResolution missingCtorResolution) [0x00024] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:1129
at ObjCRuntime.Runtime.ConstructNSObject (System.IntPtr ptr, System.IntPtr klass, ObjCRuntime.Runtime+MissingCtorResolution missingCtorResolution) [0x00010] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:1108
at ObjCRuntime.Runtime.GetNSObject (System.IntPtr ptr, ObjCRuntime.Runtime+MissingCtorResolution missingCtorResolution, System.Boolean evenInFinalizerQueue) [0x0001c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:1241
at Registrar.DynamicRegistrar.GetMethodDescriptionAndObject (System.Type type, System.IntPtr selector, System.Boolean is_static, System.IntPtr obj, System.IntPtr& mthis, System.IntPtr desc) [0x0004b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/ObjCRuntime/DynamicRegistrar.cs:867
--- End of inner exception stack trace ---
at Registrar.DynamicRegistrar.GetMethodDescriptionAndObject (System.Type type, System.IntPtr selector, System.Boolean is_static, System.IntPtr obj, System.IntPtr& mthis, System.IntPtr desc) [0x00089] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/ObjCRuntime/DynamicRegistrar.cs:874
at ObjCRuntime.Runtime.GetMethodAndObjectForSelector (System.IntPtr klass, System.IntPtr sel, System.Boolean is_static, System.IntPtr obj, System.IntPtr& mthis, System.IntPtr desc) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:744
at ObjCRuntime.Runtime.get_method_and_object_for_selector (System.IntPtr cls, System.IntPtr sel, System.Boolean is_static, System.IntPtr obj, System.IntPtr& mthis, System.IntPtr desc, System.Int32& exception_gchandle) [0x00004] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/runtime/Delegates.generated.cs:431
--- End of inner exception stack trace ---
at at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.16.0.13/src/Xamarin.iOS/UIKit/UIApplication.cs:65
at TransitionApp.iOS.Application.Main (System.String[] args) [0x00001] in /Users/ganesh/Downloads/Xamarin.Plugin.SharedTransitions-master/src/Sample/TransitionApp/TransitionApp.iOS/Main.cs:17

Custom renderer for SharedTransitionShell

Hello,

I've been working through the sample solution and have created a project that transitions between pages correctly, I need to create a custom renderer to alter the appearance of the app shell. Is it possible to extend the SharedTransitionShell? Everything I've tried has failed to recognise the custom renderer, works fine when extending the base shell component just not the SharedTransitionShell.

Any help would be appreciated, Thanks :)

Doesn't animate when destination page elements have set Transition.Group

Bug Information

Version Number of Plugin: 2.2.0
Device Tested On: Android API 29
Simulator Tested On: none
Version of VS: Community 2019 16.6.3
Version of Xamarin: 16.6.000.1062
Versions of other things you are using:
Xamarin.Forms: 4.7.0.1080
Prism.Dryloc.Forms: 7.2.0.1422

Steps to reproduce the Behavior

On destination page, set both Transition.Group and Transition.Name

Expected Behavior

Animation will happen.

Actual Behavior

No animation when navigating to destination page.

Code snippet

Source page template of collectionview:

  <BoxView
    sharedTransitions:Transition.Group="{Binding Id}"
    sharedTransitions:Transition.Name="ColorBox"
    BackgroundColor="{Binding Color}" />

Destination page:

  <BoxView
    sharedTransitions:Transition.Group="{Binding Data.Id}"
    sharedTransitions:Transition.Name="ColorBox"
    BackgroundColor="{Binding Data.Color}" />

Elaboration

I want to animate an element between multiple pages. So the flow will be something like>
Page 1: CollectionView which shows all elements
Page 2: Details page. Animate a view from collectionview to a view on this page.
Page 3: Advanced details page. Animate the same view from page 2 to this page.

If you want, I can put up a sample project.

Changing aspect ratio in the transition results in weird glitch on iOS

Bug Information

While the transition seems to animate the new bounds and the new aspect ratio on Android, on iOS it only transitions the position and then snaps to the new bounds and aspect ratio.

Version Number of Plugin: 1.0.0.1

Steps to reproduce the Behavior

Create a solution with a BindableLayout and a Second Page where you pass the image (advanced transitioning)

Expected Behavior

like on Android. -> Image changes bounds and aspect ratio while transitioning

Actual Behavior

image transitions using the old aspect ratio and then snaps to the new aspect ratio

Workaround i'm currently using

Make the source and destination image have the same height- & widthrequest.
Layout image in destination page after the transition.

Screenshots

Bug looks like this:
bug
Workaround looks like this:
workaround

Does not seem to be compatible with new AndroidX versions of Forms

Bug Information

Version Number of Plugin: 2.0.2
Device Tested On: Pixel 2 Emulator
Simulator Tested On: iOS 13 simulator
Version of VS: 2019 16.4.4
Version of Xamarin: 4.6.0.240-nightly
Versions of other things you are using:

Steps to reproduce the Behavior

  • Have the above versions of the software.
  • Try to build the solution

Expected Behavior

Builds without fail

Actual Behavior

Fails with:
Can not resolve reference: Xamarin.Android.Support.Fragment, referenced by Plugin.SharedTransitions. Please add a NuGet package or assembly reference for Xamarin.Android.Support.Fragment, or remove the reference to Plugin.SharedTransitions. ContractPlanner.Android

I don't know if this project is still active, it's not seeming so, but I can't build my solution with this plugin in it anymore.

TabbedPage

I've been messing around with your sample so far (congratz! :D ) noticed one thing: using a TabbedPage as MainPage, doesn't allow to share transitions when navigating.

Complex example and button animation

The button animation currently does not seem to work any longer.

Would it be possible to add a sample listview to detail view working animation. It does not seem to work any longer on views other than image, or is that assumption incorrect? Thanks!

[Bug] Frame doesn't respect CornerRadius in transition

The frame control seems to ignore its CornerRadius during a transition.
I ran the SampleApp with XF 4.8.0.1269. I know that Frames are kinda f***ed within XF itself at the moment but i still wanted to raise awareness and see, if you can fix this issue rather easily.
If you cannot do that however, a future XF update might resolve this issue again.
It might also be helpful to report this issue to the XF issue tracker. I have not done this yet.

Bug Information

Version Number of Plugin: 2.3
Device Tested On: iPhone 11 Pro, iOS 14b5
Simulator Tested On: iOS, multiple
Version of Xamarin: 4.8.0.1269

Steps to reproduce the Behavior

run sample app.

Expected Behavior

the frames CornerRadius animates to its chosen value during transition.

Actual Behavior

the frames CornerRadius seems to be 0 during transition and is snapping back to the chosen value after the transition.

Screenshots

iPhone-11-Pro-iOS-13 6-2020-08-30-17-41-20

Exception on sharedTransitions: Transition.Group. Can Help?

I am encountering the exception "System.MissingMethodException: 'Default constructor not found for type Plugin.SharedTransitions.Platforms.Android.TransitionEffect'"
The above Exception is triggered when I add the shared transaction to:

"<pancakeview:PancakeView Margin =" 15,0,0,5 "Elevation =" 2 "
                                                 IsClippedToBounds = "True"
                                                 HorizontalOptions = "FillAndExpand"
                                                 CornerRadius = "50,0,50,0"
                                                 BackgroundColor = "{Binding color}"
                                                 sharedTransitions: Transition.Group = "{Binding ID}"
                                                 sharedTransitions: Transition.Name = "Opportunity"> "

DataTemplate in ListView

Version Number of Plugin:2.0.2
Device Tested On: Samsung SM-G935F
Version of VS: 16.2.3
Version of Xamarin: 4.2.0.709249
Versions of other things you are using: Prism.Unity.Forms 7.2.0.1367

I want use your plugin with a DataTemplate inside a <ContentPage.Resources> (because I want use an AlternateColorDataTemplateSelector) but VS break with this error message "System.InvalidOperationException: 'Shared transitions effect can be attached only to element in a SharedNavigationPage'"

Can you help me ? thanks

[Request] Events for animations

I'd love to get some kinds of events/notifications of animation started/ended. This helps to synchronize other animations to run at the same time, and to handle any other animations we might want to do after the transition ends.

Trying to attach a TransitionEffect without name or group specified

Bug Information

Version Number of Plugin: 2.1.0
Device Tested On: Android
Version of Xamarin: 4.5.0.617

Steps to reproduce the Behavior

I attached the effect through Transition.Name on an element:

<views:CoverHeader sharedTransitions:Transition.Name="RoomPicture" />

In the second page, the exact same thing.

Pages are pushed onto a navigation page that derives from SharedTransitionNavigationPage.

Expected Behavior

Makes the transition.

Actual Behavior

No transition is made and there's this in the logs:

===== SAHARED: update property for Aterno.Views.CoverHeader:  - RoomPicture
... a bit later ...
Trying to attach a TransitionEffect without name or group specified. Nothing done

Support for UWP?

Is there a plan to support UWP, if so how long until we can expect this feature?

[Bug] Navigation.PopAsync(false) results in empty page

Bug Information

Version Number of Plugin: 2.3.0
Device Tested On: Android 10.0
Simulator Tested On: Nope
Version of VS: VS 2019
Version of Xamarin: 4.8.0.1269
Versions of other things you are using:

Steps to reproduce the Behavior

Call Navigation.PopAsync(false);

Expected Behavior

Page is popped without any animations

Actual Behavior

Page is popped, but now the current page is empty.

Csharp (C#)

Hello,

I´m not able to set up the transition working with a ListView. Here is my code:

Page 1:

myList.ItemSelected += (sender, e) =>
            {
                var item = (Item)SelectedItem;
                SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, item.id);
                App.Current.MainPage.Navigation.PushAsync(new Page2(), true);
            };

ViewCell:

var myImage = new CachedImage();
Plugin.SharedTransitions.Transition.SetName(myImage, "image");
Plugin.SharedTransitions.Transition.SetGroup(myImage, **???????**);

Page 2:

var myImage = new CachedImage();
Plugin.SharedTransitions.Transition.SetName(myImage, "image");

Thank you!

[BUG] [iOS] Entry placeholder color changes during animation when it shouldn't

As you can see in the .gif provided below, there is a weird bug happening when transitioning from one entry to another.
It looks to my like the color in question is being set for the animation and is ignoring the (placeholder) color property of the entry.

Bug Information

Version Number of Plugin: 2.2.0
Device Tested On: iPhone 11 Pro
Simulator Tested On: iOS (Multiple)
Version of Xamarin: 4.8.0.1269
Versions of other things you are using:

  • PancakeView: 2.0.1.707
  • Prism: 7.2.0.1422

Steps to reproduce the Behavior

  • Implement 2 Pages with an entry each. (with placeholder and keep colors the same for debugging)
  • "Link" them by giving them the save Transition.Name attribute.
  • Change pages.

Expected Behavior

Seamles transition from one page to another without changing any colors since origin & destination have the same colors.

Actual Behavior

The entry placeholder turns to a different shade of gray before "popping back in"

Code snippet

<Entry Text="{Binding Password}" BackgroundColor="Transparent" sharedTransitions:Transition.Name="EntryPassword" PlaceholderColor="#A2A2A2" Placeholder="Test"> </Entry>

Screenshots

RPReplay_Final1596748897

afaik the PancakeView is doing what it should do since gradients need to be rendered seperately on iOS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.