Skip to content

Conversation

@kapseliboi
Copy link

I was unable to use the CarouselView by alexrainman successfully on Linux. I always ended up getting runtime crashes on application startup when running this NuGet package. That's why I had to convert this package to use Xamarin Forms' implementation of CarouselView. I guess it has a lot less functionality and this PR is definitely going to cause some regression so this shouldn't even be accepted as is.
For example I tested with the sample application that pressing next and previous had some weird behavior with the tab that's 2nd by default on the sample app. It was skipped when either pressing next or previous depending on something.
But if this package ever decides to use Xamarin Forms' CarouselView then this code could be helpful.
There is a lot of changes to package configuration files by Rider which I can't really say whether or not it's good, bad or unnecessary.

<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<AndroidSupportedAbis>arm64-v8a;armeabi-v7a;x86;x86_64</AndroidSupportedAbis>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable to build the sample app without this line.

NewPosition = SelectedTabIndex,
OldPosition = oldPosition
};
var positionChangedArgs = _positionChangedEventArgsInfo.Invoke(
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PositionChangedEventArgs has an internal constructor so this is a "hacky" way to call it.

Copy link

@tmijieux tmijieux Dec 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kapseliboi you do not have to remove the PositionChangedEventArgs definition in the Xam.Plugin.TabView namespace nor to use the internal constructor:

Just use the fully qualified name "Xamarin.Forms.PositionChangedEventArgs" in the _carouselView_PositionSelected method parameter and continue using Xam.Plugin.TabView.PositionChangedEventArgs for the rest (fully qualified name is not required for this one i think)

That would prevent the API breakage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants