Advertisement
Guest User

Untitled

a guest
Dec 21st, 2016
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.46 KB | None | 0 0
  1.     public class App : Application
  2.     {
  3.         public App()
  4.         {
  5.             // The root page of your application
  6.             var content = new ContentPage
  7.             {
  8.                 Title = "App1",
  9.                 Content = new ScrollView
  10.                 {
  11.  
  12.                     Content = new WebView
  13.                     {
  14.                         Source = "https://www.stackoverflow.com"
  15.                     }
  16.                     //If I use entry rather than webview, it works.
  17.                     //Content = new Entry
  18.                     //{
  19.                     //    VerticalOptions = LayoutOptions.End
  20.                     //}
  21.                 }
  22.             };
  23.  
  24.             MainPage = new NavigationPage(content);
  25.         }        
  26.     }
  27.  
  28. .........
  29.     [Activity(Label = "App1", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true
  30.         , ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation
  31.         , WindowSoftInputMode = SoftInput.AdjustResize
  32.         )]
  33.     public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
  34.     {
  35.         protected override void OnCreate(Bundle bundle)
  36.         {
  37.             TabLayoutResource = Resource.Layout.Tabbar;
  38.             ToolbarResource = Resource.Layout.Toolbar;
  39.  
  40.             base.OnCreate(bundle);
  41.  
  42.             global::Xamarin.Forms.Forms.Init(this, bundle);
  43.             LoadApplication(new App());
  44.         }
  45.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement