Hi, I'm having some problems with my application. I've set ScreenOreintation to Portrait, but when I'm trying to watch something on Youtube and Facebook, it will not enter full screen. My thoughts on this is because I've set the ScreenOreintation in MainActivity to be Portrait, but I don't know how to change it back to landscape or make both options available.
public YoutubePage()
{
//This does not work:
//if (Device.OS == TargetPlatform.Android)
//{
// I don't know what to do here:
// [Activity(ScreenOrientation = Android.Content.PM.ScreenOrientation.Portrait)]
//}
var webView = new WebView
{
Source = new UrlWebViewSource
{
Url = "https://www.youtube.com/user/Audi",
//Alternativt: https://www.youtube.com/results?search_query={0}
//Where {0} = search
},
VerticalOptions = LayoutOptions.FillAndExpand
};
var pageLayout = new AbsoluteLayout { VerticalOptions = LayoutOptions.FillAndExpand, };
pageLayout.Children.Add(webView, new Rectangle(0, 0.7, 1, 0.9), AbsoluteLayoutFlags.All);
pageLayout.Children.Add(_header, new Rectangle(0, 0, 1, 0.1), AbsoluteLayoutFlags.All);
Content = pageLayout;
}