-
Notifications
You must be signed in to change notification settings - Fork 201
/
Copy pathMainActivity.cs
47 lines (41 loc) · 1.82 KB
/
MainActivity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#region Copyright Syncfusion® Inc. 2001-2025.
// Copyright Syncfusion® Inc. 2001-2025. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace SampleBrowser.SfNumericUpDown.Droid
{
[Activity(Label = "SampleBrowser SfNumericUpDown",MainLauncher = false, Icon = "@drawable/AppIcon", Theme = "@style/MainTheme", ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
double statusBarHeight, navbarheight;
protected override void OnCreate(Bundle bundle)
{
int navigationResID = Resources.GetIdentifier("navigation_bar_height", "dimen", "android");
if (navigationResID > 0)
{
navbarheight = (Resources.GetDimensionPixelSize(navigationResID) / Resources.DisplayMetrics.Density);
}
int statusResID = Resources.GetIdentifier("status_bar_height", "dimen", "android");
if (statusResID > 0)
{
statusBarHeight = (Resources.GetDimensionPixelSize(statusResID) / Resources.DisplayMetrics.Density);
}
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
SampleBrowser.Core.Droid.CoreSampleBrowser.Init(Resources,null);
LoadApplication(new App());
}
}
}