Skip to content

[Pending pull request] Android 15 target (needs UI fixes) #247

@Xavron

Description

@Xavron

Currently, seeing a UI issue with the main screen (and others) on the Android 15 emulator when target is set to Android 15. Target of Android 14 doesn't see this issue.

Definitely is affected by the same as in the link and its example screenshots:

https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge

  • "Important: If your app is not already edge-to-edge, portions of your app may be obscured and you must handle insets. Depending on the app, this work may or may not be significant. The Material 3 Scaffold component can reduce the work required to be compatible with the Android 15 edge-to-edge enforcement."

  • "Status bar
    Transparent by default.
    The top offset is disabled so content draws behind the status bar unless insets are applied."
    setStatusBarColor and R.attr#statusBarColor are deprecated and have no effect on Android 15.
    setStatusBarContrastEnforced and R.attr#statusBarContrastEnforced are deprecated but still have an effect on Android 15.

Using edge-to-edge (doesn't really work here in this app)

Notes...

  • It is very easily possible to get this working great without the action bar. But, I don't expect this as wanted.

  • Choice 2. Keeping the action bar appears to need to convert theme and bar to the way Android Studio > new project implements the bar, or switching the Activity to start from a normal layout to the pref fragment. Due to the non-similar UI in this app, this requires also using one or more of the other choices when using the former.

  • 3rd option. Change the UI more heavily (which I won't be doing as its too subjective).

Needs more testing to be sure, but now have it fully implemented with action bar, so that there's no visual difference. In addition, some code cleanup, then pull request when I get to it. In addition, I fixed the missing action bar back button on some of the screens (I don't think that was related to the other UI pull requests but didn't look). As of right now, fully working on Android 15, 14, and 8 with target of Android 15.

Side note: (Testing is showing it to be unrelated). Am seeing a rare-ish crash on start foreground while in background on Android 14 now (about weekly). I believe its related to the target sdk (it still crashed when target was at 34 and that previously was fine for many months). I need to look into this, and it may not affect this repo (except for future unknowns), but its all too unknown at this time. Might take months as can't find a way to reproduce it manually to see what's triggering it. Could in theory be from the UI changes instead with an issue not easily showing up.

  • Target sdk 35 [no]
  • UI changes for target? [so far, no]
  • Possibly from the app being force killed as I didn't have the OS setting correct? [not by itself anyway]
  • FsService > onTaskRemoved and the app being force end by the OS is where it begins. As am no longer seeing the crash since fixing the network stability of new networking hardware, and app being killed by itself doesn't seem to be causing it either. I cannot retest the network stability problem. But, appears so far to have nothing to do with the changes for the issue of this post. Will hold on it for some weeks to see if it stays that way. The UI still needs full testing after that. Update: Looks like half is definitely the OS killing the Service causing onTaskRemoved to run the code again in the bg. The other half, although no longer happening (am checking that further as of now), can maybe be guarded against with catches (would need throw tests done) but doesn't appear to be related to anything in this issue here so won't be included here unless further testing shows something. This isn't from this target or UI changes and is a separate issue. This is done here. Separate issue has been created.

Testing shows one odd issue. (Maybe) that can be fixed (when I can get to it), and then will make a pull request provided it can be fixed without a major change.

Found a simple fix for the last issue. I expect to do a pull request for this soon. (Although do see a warning of a raised target min for a piece of code in manifest. Not sure when that showed up as builds don't fail from it. Need to look into that first. And didn't notice any issues even on Android 6 in previous testing but could have missed it.)

SDK 35 or latest Android Studio (wrong error or correct?) is soft flagging (no build failure)

android:name=".gui.FsTileService"
as wanting increased minimum target there to Android 7.0. Edit: Looks like that Service has always required A7 and it doesn't show up as an issue in Android Studio pre-SDK 35. Need to test on A6. Unsure if it can be blocked from A6 as its in the manifest but maybe? Maybe it works but just complains now. Edit: Can be ignored. No problem is showing from this on A6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions