Is it possible to start the VideoPlayer in fullscreen?
When opening a page, like the PlayWebVideoPage in the demo, would it be possible to start the VideoPlayer in fullscreeen instead of windowed?
In order to achieve that, your video page must be set without NavigationBar:
NavigationPage.SetHasNavigationBar(this, false);
And then, you will also have to hide the Status Bar, both in Android and iOS.
Related
Is it possible to implement a draggable view with Xamarin View? Is there basically an event that I can use that gets triggered when a finger is pressed on the screen, then moved and then released without having to use native Android/iOS code? I don't mean a swipe event, I know this exists. I am looking for a event so I can let the user be able to drag a rectangle across the screen for example.
Looked for it on the internet, but can only seem to find just normal Touch, Swipe and Tap events. (Although I found it is possible using native Android/IOS code.
Is it possible to have a lottie animation when the splash screen is launched?
any examples out there on xamarin?
thanks
No, it's impossible on iOS. The launch screen on iOS only accepts the static image and we can't add any code behind to adjust its display.
If you want to implement it on Xamarin. I recommend you to use a splash page as the App's MainPage first. Place your animation there. Then change the App's MainPage to your first page after the animation has finished.
I don't think it is possible, because there is no code-behind available.
Workaround would be to place a screen after the splash screen and add your Lottie animation there. This way you can also control how long you want to show the (fake) splashscreen.
After doing enough research, i could able to achieve it using Xamarin forms.
Android it was little tricky as it was not triggering "GestureStatus.Completed" in OnPanUpdated event when user does a swipe to certain area, but android triggers the Tap gesture event at this instance instead of Pan gesture event. So need to handle code separately for Android by collecting the coordinates of the card till where it was swiped.
Also to note for android, i have used a additional extra layout with opacity 0.0 upon the top card in the existing stack, with this we can get a smooth transition when user does the panning or swiping. Practically user swipes a extra layout with visible==true but with opacity 0.0, based on this extra transparent layout movements we will receive events in Tap or Pan gesture methods and we can move the actual top card in the existing stack which is under the transparent layout.
In iPhone and Windows Phone it triggers GestureStatus.Running and GestureStatus.Completed perfectly, so no need to create a hack extra layer. Code snippet is pasted below.
Android sample code to achieve panning or swiping smoothly:
'
private AbsoluteLayout createGestureSupportlayout()
{
AbsoluteLayout gestureSupportlayout = new AbsoluteLayout();
gestureSupportlayout.WidthRequest = frameWidth;
gestureSupportlayout.HeightRequest = frameHeight;
gestureSupportlayout.VerticalOptions = LayoutOptions.Center;
gestureSupportlayout.HorizontalOptions = LayoutOptions.Center;
gestureSupportlayout.Opacity = 0.0;
//In andriod, make Gesture support layout visible if invoices are present
gestureSupportlayout.SetBinding(IsVisibleProperty, "GestureSupportLayoutVisible");
return gestureSupportlayout;
}
'
You can use this plugin: SwipeCardView is a lightweight MVVM friendly user control that brings Tinder-style swipe card view into Xamarin.Forms applications.
In your view xaml:
<swipeCardView:SwipeCardView
ItemsSource="{Binding ViewModelItems}"
SwipedLeftCommand="{Binding SwipedLeftCommand}"
SwipedRightCommand="{Binding SwipedRightCommand}"
TopItem="{Binding TopItem}">
<swipeCardView:SwipeCardView.ItemTemplate>
<DataTemplate x:Name="SomeTemplate">
<!-- Template -->
</DataTemplate>
</swipeCardView:SwipeCardView.ItemTemplate>
</swipeCardView:SwipeCardView>
For a detailed explanation of design, implementation and usage of this library, check my blog post: Create Tinder-like UI in Xamarin Forms using SwipeCardView.
Another framework for this is https://github.com/robinmanuelthiel/swipecards
In my Xamarin.Forms app, I have a MasterDetailPage with MasterBehavior set to Split when the device Idiom is Tablet. That is, I always want master page to be displayed.
The exception is during multitasking. For example, on iOS, if the user enters Split View, then I want the app to behave like it's on a phone, with no split view, but instead just a master or detail page displayed, and the proper navigation controls to move between them.
It seems like MasterDetailPage wants to help me with this. When I drag up another app to enter Split View on iOS, my app no longer shows the master page. However, the detail page that remains has no navigation control to return to the master.
What is the proper way to detect the mode change and dynamically adjust the navigation in Xamarin.Forms when your app enters and leaves Split View on iOS or split-screen mode on Android?
Is there any way that i can Push a SplitViewController in my app?
I have a regular view and when the user clicks a button, i would like to push a SplitViewController.
Simple as that, I can find anything to help on Google.
There is no way to push SplitViewController. If you want to use it according to apple it needs to be the root view of your application.
There is a workaround for that though (not %100 gauranteed to be accepted by apple). You need to change the Root of your main Window in AppDelegate manually and animate it yourself.
Edit:
I found some code for changing the rootViewController of the window:
AppDelegate delegate = [[UIApllication sharedApplication] delegate];
[[delegate window] rootViewController] = yourSplitViewController;