mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-16 07:06:33 +01:00
50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
|
|
|||
|
using Android.App;
|
|||
|
using Android.Content.PM;
|
|||
|
using Android.OS;
|
|||
|
using Android.Content;
|
|||
|
using Java.Interop;
|
|||
|
|
|||
|
namespace TINK.Droid
|
|||
|
{
|
|||
|
[Activity (Label = "Sharee", Icon = "@drawable/sharee", Theme="@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
|
|||
|
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
|||
|
{
|
|||
|
protected override void OnCreate (Bundle bundle)
|
|||
|
{
|
|||
|
TabLayoutResource = Resource.Layout.Tabbar;
|
|||
|
ToolbarResource = Resource.Layout.Toolbar;
|
|||
|
|
|||
|
base.OnCreate (bundle);
|
|||
|
|
|||
|
global::Xamarin.Forms.Forms.Init (this, bundle);
|
|||
|
|
|||
|
// Required for initialization of Maps, see https://developer.xamarin.com/guides/xamarin-forms/user-interface/map/
|
|||
|
Xamarin.FormsGoogleMaps.Init(this, bundle);
|
|||
|
|
|||
|
// Required for initialization of binding package, see https://github.com/nuitsjp/Xamarin.Forms.GoogleMaps.Bindings.
|
|||
|
Xamarin.FormsGoogleMapsBindings.Init();
|
|||
|
|
|||
|
// Get version name of app.
|
|||
|
Context context = ApplicationContext;
|
|||
|
new Model.Device.AppInfo(context.PackageManager.GetPackageInfo(context.PackageName, 0).VersionName);
|
|||
|
|
|||
|
Xamarin.Forms.Forms.ViewInitialized += (object sender, Xamarin.Forms.ViewInitializedEventArgs e) => {
|
|||
|
if (!string.IsNullOrWhiteSpace(e.View.AutomationId))
|
|||
|
{
|
|||
|
e.NativeView.ContentDescription = e.View.AutomationId;
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
LoadApplication(new App());
|
|||
|
}
|
|||
|
|
|||
|
[Export("TapStation")]
|
|||
|
public void TapStation(string stationNr)
|
|||
|
{
|
|||
|
BackdoorMethodHelpers.DoTapPage(stationNr);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|