Beispiel #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            touchEventsSetup = false;

            ThreadPool.SetMaxThreads(10, 10);

            DesignHelper.SetBar(this, Title, Title, 0);


            //MainActivity is our launch activity
            if (!(this is MainActivity))
            {
                ActionBar.SetDisplayHomeAsUpEnabled(true);
            }

            prefs  = GetSharedPreferences("settings", FileCreationMode.Private);
            editor = prefs.Edit();


            _isGooglePlayServicesInstalled = IsGooglePlayServicesInstalled();

            if (_isGooglePlayServicesInstalled)
            {
                apiClient = new GoogleApiClient.Builder(this, this, this)
                            .AddApi(LocationServices.API).Build();

                locRequest = new LocationRequest();
            }
            else
            {
                Console.WriteLine($"Google Play Services is not installed");
                Toast.MakeText(this, "Google Play Services is not installed", ToastLength.Long).Show();
            }
        }
Beispiel #2
0
 public void SetTitle(string title)
 {
     RunOnUiThread(() => { DesignHelper.SetBar(this, $"{title}", $"Form - {title}", 0); });
 }