protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); wind = new Wind(guid); environment = new Api.Environment(guid); precipitation = new Api.Precipitation(guid); SetContentView(Resource.Layout.Main); //var imgbutton = FindViewById<ImageButton>(Resource.Id.imgWeatherBtn); Button button = FindViewById <Button>(Resource.Id.weatherBtn); button.Click += weatherBtn_Click; FindViewById <TextView>(Resource.Id.resultUrlText).Text = wind.GetLatestUrl(); //Device.OpenUri(new Uri(Core.GetLatestWindUrl(guid))); FindViewById <TextView>(Resource.Id.windSpeedUnit).Text = Settings.SpeedUnit.ToSpeedProperCase(); FindViewById <TextView>(Resource.Id.windMaxSpeedUnit).Text = Settings.SpeedUnit.ToSpeedProperCase(); FindViewById <TextView>(Resource.Id.temperatureUnit).Text = Settings.TemperatureUnit.ToTempProperCase(); FindViewById <TextView>(Resource.Id.airPressureUnit).Text = Settings.AirPressureUnit.ToAPProperCase(); FindViewById <TextView>(Resource.Id.dewPointUnit).Text = Settings.TemperatureUnit.ToTempProperCase(); }
public static void SetEnvironment(Api.Environment env) { if (env == Api.Environment.Development) { __setServer(0); } else if (env == Api.Environment.Staging) { __setServer(1); } else if (env == Api.Environment.Production) { __setServer(2); } }
public static void SetEnvironment(Api.Environment environment) { AndroidJavaClass enumClass = new AndroidJavaClass("co.adison.offerwall.Server"); if (environment == Api.Environment.Development) { PluginClass.CallStatic("setServer", new object[1] { enumClass.GetStatic <AndroidJavaObject>("Development") }); } else if (environment == Api.Environment.Staging) { PluginClass.CallStatic("setServer", new object[1] { enumClass.GetStatic <AndroidJavaObject>("Staging") }); } else if (environment == Api.Environment.Production) { PluginClass.CallStatic("setServer", new object[1] { enumClass.GetStatic <AndroidJavaObject>("Production") }); } }