Code Monkey home page Code Monkey logo

Comments (17)

morta5 avatar morta5 commented on June 8, 2024 1

https://developer.android.com/reference/android/view/DisplayCutout.html#getWaterfallInsets()

from mastodon-android.

grishka avatar grishka commented on June 8, 2024 1

I'm leaning towards this being something Motorola did that can't be reproduced on AOSP/Pixel, but as I said, I'd like to collect more reports to see how many, and which, devices are affected, if any.

It does only happen when using the "fullscreen" option to open the app, which should enable(or force idk.) the waterfall area.

It does look like an OEM addition. There's no such thing on the emulator.

screenshot

from mastodon-android.

grishka avatar grishka commented on June 8, 2024 1

Sure, but do you also have (black)/#282c37/unused bars at the right and left of the screen on your S9 and are these intended?

Nope. But then it runs Android 9, and waterfall insets were only added in 10.

from mastodon-android.

morta5 avatar morta5 commented on June 8, 2024 1

Sure. Here are all screenshots in both modes (but there doesn't seem to be any difference between fullscreen and normal):
Screenshot_20220414-011002
Screenshot_20220414-010955
Screenshot_20220414-010937
Screenshot_20220414-010919
Screenshot_20220414-010906
Screenshot_20220414-010850
Screenshot_20220414-010813
Screenshot_20220414-010732

from mastodon-android.

grishka avatar grishka commented on June 8, 2024

TIL that this device exists. It looks pretty similar to the Galaxy S9 I mostly debug the app on.

But, things getting beneath the status bar is something I'd like to avoid. Do they do something special with the window insets (it feels like they do)? Do they have any developer docs about that?

from mastodon-android.

grishka avatar grishka commented on June 8, 2024

That's about the edges, but doesn't explain why systemWindowInsets seemingly aren't returned correctly 🤔

from mastodon-android.

morta5 avatar morta5 commented on June 8, 2024

Not sure but after tapping on the settings-icon and going back it is getting displayed correctly
Screenshot_20220413-210513
Edit: the screenshot I uploaded doesn't include the waterfall-area, which was in #282c37 when I made this screenshot. I think my device just disabled the waterfall.

from mastodon-android.

grishka avatar grishka commented on June 8, 2024

Okay. Does it also fix itself if you rotate the screen? And it's Android 11 and stock ROM, right?

It might well be that my handling of window insets isn't 100% correct, so for now I'll wait to see if this issue happens on any other devices. In particular, I only have one device with a screen cutout (Pixel 4a), so my testing in this area is somewhat limited.

from mastodon-android.

morta5 avatar morta5 commented on June 8, 2024

No, it doesn't fix itself when rotating and yes, it's the stock Android 11 rom.
Btw can't you just emulate the waterfall in developer settings?
Screenshot_20220413-211748

from mastodon-android.

grishka avatar grishka commented on June 8, 2024

Indeed I can, but I still can't reproduce the "toolbar ends up behind the status bar" thing 🤔
(this is an emulator with android 12)
screenshot

from mastodon-android.

morta5 avatar morta5 commented on June 8, 2024

It does only happen when using the "fullscreen" option to open the app, which should enable(or force idk.) the waterfall area.
Screenshot_20220413-212928-327

from mastodon-android.

morta5 avatar morta5 commented on June 8, 2024

Sure, but do you also have (black)/#282c37/unused bars at the right and left of the screen on your S9 and are these intended?
The toolbar thing wasn't actually why I opened this issue, it was about the unused waterfall area(which is probably why this sometimes happens).

from mastodon-android.

grishka avatar grishka commented on June 8, 2024

Anyway, I was bored and I wanted something similar for quite some time, so I made a simple app that visualizes the window insets in an easy to understand form. Could you please install it and take screenshots in both modes?

For those curious, here it is running on different devices

screenshot

screenshot

screenshot

screenshot

app-debug.apk.zip (remove .zip after downloading because github is picky about file types)

from mastodon-android.

grishka avatar grishka commented on June 8, 2024

Thanks!

Setting LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS was probably not a good idea (and the Mastodon app doesn't do it). Try this one, there should be a difference in those modes with the checkbox unchecked:
app-debug.apk.zip

from mastodon-android.

morta5 avatar morta5 commented on June 8, 2024

Those marked with "F" were made in fullscreen mode
Screenshot_20220414-013154-272
Screenshot_20220414-013139-551
Screenshot_20220414-013110
Screenshot_20220414-013104
Screenshot_20220414-013049
Screenshot_20220414-013041
Screenshot_20220414-013030-241
Screenshot_20220414-013016-580
Edit: The screenshot of the last picture(fullscreen, no LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) doesn't include the waterfall area which I can see. The visualisation in the background doesn't make a difference in fullscreen when checking and unchecking the box(for me, on the screen).

from mastodon-android.

grishka avatar grishka commented on June 8, 2024

Hm. Yes it does look like I expect it to (the top system inset is there), the toolbar getting behind the status bar must be a bug in the way I handle insets then. Also strange how no DisplayCutout is returned at all when you don't set that layout mode 🤔

from mastodon-android.

morta5 avatar morta5 commented on June 8, 2024

Also strange how no DisplayCutout is returned at all when you don't set that layout mode 🤔

That seems to be a bug. I tried it a second time and now I am seeing the display cutout.
Screenshot_20220414-015013~2
Screenshot_20220414-015055
Edit: If fullscreen is enabled before opening it the first time after force-closing, you'll always get the cutout. If it was disabled, you only get it if this layout-mode is set.

from mastodon-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.