public static void SetTitleBarVisibility(Activity activity, AndroidTitleBarVisibility visibility) { if (visibility == AndroidTitleBarVisibility.Never) { if (!activity.Window.Attributes.Flags.HasFlag(WindowManagerFlags.Fullscreen)) { activity.Window.AddFlags(WindowManagerFlags.Fullscreen); } } else { if (activity.Window.Attributes.Flags.HasFlag(WindowManagerFlags.Fullscreen)) { activity.Window.ClearFlags(WindowManagerFlags.Fullscreen); } } }
public static void SetTitleBarVisibility(AndroidTitleBarVisibility visibility) { if (Context.GetActivity() == null) { throw new NullReferenceException("Must be called after Xamarin.Forms.Forms.Init() method"); } if (visibility == AndroidTitleBarVisibility.Never) { if (!Context.GetActivity().Window.Attributes.Flags.HasFlag(WindowManagerFlags.Fullscreen)) { Context.GetActivity().Window.AddFlags(WindowManagerFlags.Fullscreen); } } else { if (Context.GetActivity().Window.Attributes.Flags.HasFlag(WindowManagerFlags.Fullscreen)) { Context.GetActivity().Window.ClearFlags(WindowManagerFlags.Fullscreen); } } }
public static void SetTitleBarVisibility(AndroidTitleBarVisibility visibility) { TitleBarVisibility = visibility; }