You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to customise the status bar natively does not work at all in avalonia. All techniques mentioned in https://developer.android.com do not work.
It only works when AppCompatActivity is extended instead of AvaloniaMainActivity but then it wouldn't be an avalonia app anymore:
public class MainActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
View decorView = Window.DecorView;
var uiOptions = decorView.WindowSystemUiVisibility;
var newuioptions = uiOptions;
newuioptions |= SystemUiFlags.LayoutStable | SystemUiFlags.LayoutFullscreen;
decorView.SystemUiFlags = newuioptions;
Window.SetStatusBarColor(Color.Red);
base.OnCreate(savedInstanceState);
}
}
To Reproduce
Create a new Avalonia xplat app and try to customise the android status bar whether through the style.xml, AndroidInset, AndroidSystemFlags, Window.SetSystemStatusBar color, EdgeToEdge, even Maui communityToolkit. No native apis will work if AvaloniaMainActivity is extended.
Expected behavior
Status bar should follow native styling
Avalonia version
11.0.9
OS
No response
Additional context
Android
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempting to customise the status bar natively does not work at all in avalonia. All techniques mentioned in https://developer.android.com do not work.
It only works when AppCompatActivity is extended instead of AvaloniaMainActivity but then it wouldn't be an avalonia app anymore:
To Reproduce
Create a new Avalonia xplat app and try to customise the android status bar whether through the style.xml, AndroidInset, AndroidSystemFlags, Window.SetSystemStatusBar color, EdgeToEdge, even Maui communityToolkit. No native apis will work if AvaloniaMainActivity is extended.
Expected behavior
Status bar should follow native styling
Avalonia version
11.0.9
OS
No response
Additional context
Android
The text was updated successfully, but these errors were encountered: