Title bar extends into status bar, Android 15
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug. Not a question or feature request.
- [X] The topic is not already reported at Issues. (I've searched it).
- [X] Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.
- [X] The bug is still present in the latest development version (git master). (Please download and try the test version of Markor, named Marder. Don't worry; Markor and Marder appear as completely separate applications. You can install both side-by-side, and Markor settings are not touched. In case the issue is resolved there, you don't need to create a bug report. The change will be part of the next Markor update.)
Description
When entering a file or the settings, the app takes up the whole screen rather than just the space below the status bar, making the UI at the top uninteractable and making it look odd.
Steps to reproduce
- Enter the settings menu through the three dots.
- The UI extends under the status bar
Information
Android version: Android 15 Device: Google Pixel 6 App Version: v2.12.5-0934 (240802)
Images for reference:
Source
git master branch
Format / File type
Not specific
Additional info / Log
No response
I am on a pixel 7 and I do not see this.
Does this happen on the latest release?
I am on a pixel 7 and I do not see this.
Does this happen on the latest release?
I tested on the latest nightly build. Are you on the Android 15 beta?
I'm not on the android beta program, no
I just had the same issue in Syncthing-Fork! I think this is probably caused by Android 15 then. Any idea what specifically causes this or how to fix it (or if it's a bug that needs to be reported to AOSP)?
Maybe appcompat is not properly fully compatible yet
I've just been upgraded to Android 15 and I can see this same problem.
I think this might be related to the edge to edge feature. If your app targets SDK 35, then the app spans the entire length of the screen.
Pixel 6 same
Easy fix would be to change target SDK to 34 instead, and rebuild and release. Since all stock Google Pixel owners are being force upgraded to Android 15 since two days ago, and all GrapheneOS users will be done the same in two days, this issue starts affecting many now. Buttons to save and revert last change and so on are basically unclickable as it is now.
Problem likely introduced here:
https://github.com/gsantner/markor/commit/5de71d5e562e3b5289c08f88c074e8ce4761fad8#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7R17
Proper solution is to implement proper handling of edge to edge. But other projects that have done that have had to do quite a few code changes and later fixups, so I suggest reverting to SDK 34 first, get that update out, and then try to calmly retarget the code for SDK 35 after that including all needed code changes.
I would prefer it to be fixed instead of downgrading. Anyway Google will enforce upgrade to 35 in upcoming times.
I noticed the issue is much worse than just overlapping status bar. Actually the last 10 lines of the text document ends up under the keyboard, so you cannot see what you type at all if you are editing the end of a document long enough to fill your screen. Also, the bar with the editing options also ends up under the keyboard, and can only be accessed by minimizing the keyboard. But the keyboard automatically pops up again if clicking most of them, making it very tedious to use those editing options.
So not only do the UI not account for screen cutouts, but also no longer account for the space the keyboard occupy. The editor is mostly unusable in the current state.
Since you didn't want to temporaily revert to SDK 34, is there a time frame for when we can expect this issue to be resolved?
Would there be any help you would appreciate to get this issue resolved, ie that someone else works on it and make a pull request?
What I am asking is, do you intend to speedily resolve it yourself, or do you lack time, energy or access to Android 15, and this ticket thus is "patches welcome"?
Thanks for writing this out, I also noticed this.
is there a time frame for when we can expect this issue to be resolved?
There was no meaningful fix suggestion or documentation, so no ETA. Generally, no ETAs for anything.
Would there be any help you would appreciate to get this issue resolved, ie that someone else works on it and make a pull request?
Help is definitely welcome, just like to pretty much everything here. No there is no known open PRs related to this.
I can just confirm that at the moment it has become impossible to use the app normally on android 15. :(
Sorry I posted on a duplicate issue. I can confirm this happens on Android 15 on the Pixel 7 Pro also. Thanks so much Google for breaking the most superior Markdown Editor on F-Droid.
I've managed to temporarily work around this issue by downgrading Markor to v2.12.3 – which has the target SDK as 33 and hence does not have the Edge-to-Edge Enforcement that Android 15 applies when SDK 35 is targeted.
Apparently there is a way to opt-out of the Edge-to-Edge Enforcement policy: https://developer.android.com/reference/android/R.attr#windowOptOutEdgeToEdgeEnforcement
I'm a software developer but not for Android – but I'll see if I can figure out how to get that setting into Markor, and create a PR for it.
Please try the build from https://github.com/gsantner/markor/actions/runs/11489636870
The new build functions correctly on Google Pixel 8 Pro with Graphene OS Android 15/Build 2024102100. Now I can push the save button and get to Markor's top menu bar. Editing is noticeably slower for me I am not sure why.
Working for me as well, also on Graphene OS/Android 15.
I can also confirm Version 2.12.5-2319 fixes the issue for me
The new build functions correctly on Google Pixel 8 Pro with Graphene OS Android 15/Build 2024102100. Now I can push the save button and get to Markor's top menu bar. Editing is noticeably slower for me I am not sure why.
This is because it's a debug build I think, the app is even called "Marder", instead of Markor. I'll wait for the release build.
I can confirm the build above resolves all the issues.
Thanks for confirming.
Seems bad in Android SDK update that it's ""broken by default, opt out not to""" instead of """opt in to break/use feature""".
Actually, you opted in for this change by setting targetSdk to 35.
Google always publishes the list of changes of every new SDK and warns you of the breaking changes in Android Studio if you try to bump the targetSdk.
For example, for SDK 35, the list of changes and how to migrate when:
- setting
compileSdkto35: https://developer.android.com/about/versions/15/behavior-changes-all?hl=en - setting
targetSdkto35: https://developer.android.com/about/versions/15/behavior-changes-15?hl=en
As for edge-to-edge, Google probably decided to enforce it for SDK 35 because unfortunately not so many apps support insets and that gives a bad user experience to users on devices with insets, and most up-to-date apps already use standard Material 3 components which already handle insets with no change needed.
The windowOptOutEdgeToEdgeEnforcement is marked as deprecated so while it's appreciated to have it as a hotfix for now, it's not a long term solution, as you never know when Google will remove this property, or make it do nothing ;)
Is there a way to get an APK for 2.12.5-2319 ?
Check the Actions tab on GitHub project
Please try the build from https://github.com/gsantner/markor/actions/runs/11489636870
Just got around to testing this, seems to work fine. Thanks!
You can fix it as below
1. Enable edge-to-edge display
EdgeToEdge.enable(this);
2. Apply the top inset as margin to your toolbar (or any custom view)
ViewCompat.setOnApplyWindowInsetsListener(toolbar, (v, windowInsets) -> {
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
layoutParams.topMargin = insets.top;
v.setLayoutParams(layoutParams);
return windowInsets;
});
Update your onCreate() method as below
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Enable edge-to-edge display
EdgeToEdge.enable(this);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.rootToolbar); // Or use some custom-view
// Apply the top inset as margin to your toolbar
ViewCompat.setOnApplyWindowInsetsListener(toolbar, (v, windowInsets) -> {
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
layoutParams.topMargin = insets.top;
v.setLayoutParams(layoutParams);
return windowInsets;
});
}
Upvote if it worked for you: https://stackoverflow.com/a/79713693/15251854