I have an App. It works this way.
Login page is opened. When i log in the App i'm redirected to a MainPage. This page(Main) it must have just Orientatio = Portrait, but when i click over an image, so am redirected to Webview(called Painés). These webview must be Portrait or Landscape. If i put in the MainActivity something as:
ScreenOrientation = ScreenOrientation.Portrait
all pages will be Portrait. How can i do each page portrait or landscape or both?
Answers
check this
https://forums.xamarin.com/discussion/comment/142012/#Comment_142012
https://forums.xamarin.com/discussion/42849/fix-orientation-for-one-page-in-the-app-is-it-possible-with-xamarin-forms
@DarshanJS , is possible that code work in the Android? Because is to IOS(First link)
HI @pnet1
check thishttps://wintellect.com/responding-to-orientation-changes-in-xamarin-forms/
i thought you may looking for both then you can refer 2nd link and also @Charwaka link
@Charwaka, i didn't undertand. How do i change Page1 only Porytrait and Page2 Portrait and Landscape? If i do in the mainactivity
ScreenOrientation = ScreenOrientation.Portrait
all pages will be portrait. I want Page1 - Just Portrait and Page2 - Portrait and Landscape
@pnet1
you should set in them Xamal Page cs in constructor
set this
for both portrait and Landscape
SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
for only potrait
SupportedOrientations = SupportedPageOrientation.Portrait;
@Charwaka, this page is in my PCL(Net Standard). SupportedOrientations belongs to Support.V7. These library are in the Droid project. Must install it in the PCL this reference, cause is getting an error?
HI @pnet1
check the answer in this
https://forums.xamarin.com/discussion/comment/142012/#Comment_142012
@Charwaka, thanks, but that solution is for IOS.
you can write something like that