public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { base.OnConfigurationChanged(newConfig); ConfigurationChanged?.Invoke(this, new EventArgs()); System.Maui.Application.Current?.OnRequestedThemeChanged(new AppThemeChangedEventArgs(System.Maui.Application.Current.RequestedTheme)); }
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { base.OnConfigurationChanged(newConfig); EventHandler handler = ConfigurationChanged; handler?.Invoke(this, new EventArgs()); }
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { base.OnConfigurationChanged(newConfig); UpdateLayout(); Dialog.Window.SetSoftInputMode(SoftInput.StateAlwaysHidden); }
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { if (id_onConfigurationChanged_Landroid_content_res_Configuration_ == IntPtr.Zero) { id_onConfigurationChanged_Landroid_content_res_Configuration_ = JNIEnv.GetMethodID(class_ref, "onConfigurationChanged", "(Landroid/content/res/Configuration;)V"); } JNIEnv.CallVoidMethod(Handle, id_onConfigurationChanged_Landroid_content_res_Configuration_, new JValue(newConfig)); }
protected override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { base.OnConfigurationChanged(newConfig); if (newConfig.Orientation != _orientation) { OnElementChanged(new ElementChangedEventArgs <XamGridView>(this.Element, this.Element)); } }
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { base.OnConfigurationChanged(newConfig); if (_mapView != null) { _mapView.Invalidate(); } }
/// <summary> /// Send orientation change message through MessagingCenter /// </summary> /// <param name="newConfig">New configuration</param> public static void NotifyOrientationChange(global::Android.Content.Res.Configuration newConfig) { bool isLandscape = newConfig.Orientation == global::Android.Content.Res.Orientation.Landscape; var msg = new DeviceOrientationChangeMessage() { Orientation = isLandscape ? DeviceOrientations.Landscape : DeviceOrientations.Portrait }; MessagingCenter.Send <DeviceOrientationChangeMessage>(msg, DeviceOrientationChangeMessage.MessageId); }
public unsafe void OnConfigurationChanged(global::Android.Content.Res.Configuration p0) { const string __id = "onConfigurationChanged.(Landroid/content/res/Configuration;)V"; try { JniArgumentValue *__args = stackalloc JniArgumentValue [1]; __args [0] = new JniArgumentValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle); _members.InstanceMethods.InvokeNonvirtualVoidMethod(__id, this, __args); } finally { } }
public void SetLocale(LocaleItemWithCultureCode cultureCode) { Locale locale = String.IsNullOrEmpty(cultureCode.CountryCode) ? new Locale(cultureCode.LanguageCode) : new Locale(cultureCode.LanguageCode, cultureCode.CountryCode); Locale.Default = locale; var config = new global::Android.Content.Res.Configuration(); config.Locale = locale; var context = global::Android.App.Application.Context; context.Resources.UpdateConfiguration(config, context.Resources.DisplayMetrics); }
public void SetLocale() { var androidLocale = Java.Util.Locale.Default; var netlanguage = androidLocale.ToString().Replace("_", "-"); // turns pt_BR into pt-BR var config = new global::Android.Content.Res.Configuration(); config.Locale = new Locale(netlanguage);; var context = global::Android.App.Application.Context; context.Resources.UpdateConfiguration(config, context.Resources.DisplayMetrics); Java.Util.Locale.Default = new Locale(netlanguage); }
protected override unsafe void OnConfigurationChanged(global::Android.Content.Res.Configuration p0) { if (id_onConfigurationChanged_Landroid_content_res_Configuration_ == IntPtr.Zero) { id_onConfigurationChanged_Landroid_content_res_Configuration_ = JNIEnv.GetMethodID(class_ref, "onConfigurationChanged", "(Landroid/content/res/Configuration;)V"); } try { JValue *__args = stackalloc JValue [1]; __args [0] = new JValue(p0); JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_onConfigurationChanged_Landroid_content_res_Configuration_, __args); } finally { } }
/// <summary> /// Called when [configuration changed]. /// </summary> /// <param name="newConfig">The new configuration.</param> public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { this.Log().Debug("OnConfigurationChanged => {0}", Convert.ToString(newConfig)); base.OnConfigurationChanged(newConfig); //if (newConfig.Orientation == // Android.Content.Res.Orientation.Portrait) //{ // _tv.LayoutParameters = _layoutParamsPortrait; // _tv.Text = "Changed to portrait"; //} //else if (newConfig.Orientation == // Android.Content.Res.Orientation.Landscape) //{ // _tv.LayoutParameters = _layoutParamsLandscape; // _tv.Text = "Changed to landscape"; //} }
/// <inheritdoc/> public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { if (Ultraviolet != null && !Ultraviolet.Disposed) { var display = Ultraviolet.GetPlatform().Displays[0]; var rotation = (ScreenRotation)WindowManager.DefaultDisplay.Rotation; if (rotation != display.Rotation) { AndroidScreenRotationService.UpdateScreenRotation(rotation); var messageData = Ultraviolet.Messages.CreateMessageData <OrientationChangedMessageData>(); messageData.Display = display; Ultraviolet.Messages.Publish(UltravioletMessages.OrientationChanged, messageData); } } base.OnConfigurationChanged(newConfig); }
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { base.OnConfigurationChanged(newConfig); DeviceOrientationImplementation.NotifyOrientationChange(newConfig); }
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { Logger.WriteLine("Экран повeрнулся"); base.OnConfigurationChanged(newConfig); }
public static void NotifyOrientationChange(global::Android.Content.Res.Configuration newConfig) { bool isLandscape = newConfig.Orientation == global::Android.Content.Res.Orientation.Landscape; MessagingCenter.Send <object>(isLandscape ? DeviceOrientations.Landscape : DeviceOrientations.Portrait, "DeviceOrientationChanged"); }
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { // we're good base.OnConfigurationChanged(newConfig); }
protected abstract void OnConfigurationChanged(global::Android.Content.Res.Configuration p0);
static void n_OnConfigurationChanged_Landroid_content_res_Configuration_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0) { global::com.mopub.mobileads.BaseVideoViewController __this = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.BaseVideoViewController> (jnienv, native__this, JniHandleOwnership.DoNotTransfer); global::Android.Content.Res.Configuration p0 = global::Java.Lang.Object.GetObject <global::Android.Content.Res.Configuration> (native_p0, JniHandleOwnership.DoNotTransfer); __this.OnConfigurationChanged(p0); }
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { base.OnConfigurationChanged(newConfig); _drawerToggle.OnConfigurationChanged(newConfig); }
protected override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) { base.OnConfigurationChanged(newConfig); Invalidate(); }