Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

MediaViewer: fix position of option buttons #12

Open
saket opened this issue Jan 12, 2019 · 7 comments
Open

MediaViewer: fix position of option buttons #12

saket opened this issue Jan 12, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@saket
Copy link

saket commented Jan 12, 2019

Tried out this patch, but it doesn't seem to work. I tested on a Nougat (API 25) emulator.

Before:

screenshot_1547304905

After:

screenshot_1547304852

  • The option buttons moved behind the navigation bar
  • The status bar is now partially visible. I was using WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS so that the translucent bar also gets removed.

What phone did you test this on?

@Tunous
Copy link
Owner

Tunous commented Jan 12, 2019

Interesting, I must admit I didn't test this on API 25 but on API 28. Perhaps it has some issues with calculating fitsSystemWindows insets. I'll try to find what's wrong.

@Tunous Tunous added the bug Something isn't working label Jan 12, 2019
@Tunous
Copy link
Owner

Tunous commented Jan 12, 2019

I did not manage to reproduce this entirely here. Initially everything looked correctly and these buttons were above navigation bar, but that broke when rotating device. I've pushed additional commit that fixes this to a separate branch here: 552f89d

I have found another bug. Not sure how to fix that:
screenshot_1547309254

The status bar is now partially visible. I was using WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS so that the translucent bar also gets removed.

Personally I found this to be a good side effect 😁. It improves readability of status bar icons, which can be always hidden by entering full-screen mode when needed. But I removed that flag because it was breaking fitsSystemWindows insets.

@mvietri
Copy link

mvietri commented Jan 13, 2019

I'm on API 27 but my phone has hw buttons and I can't test this on the emulator since is so damn slow to even try to use it.

@saket
Copy link
Author

saket commented Jan 13, 2019

I have found another bug. Not sure how to fix that:

Whoops. I don't think this can be fixed letting the layout extend behind the status bar. The dark gradient has to start from the bottom.

Personally I found this to be a good side effect 😁. It improves readability of status bar icons,

I see where you're coming from, but I wanted to give the content image/video a higher priority than the status bar icons in the media viewer screen.

We could… dim the status bar so that the icons don't interfere with the media.

@saket
Copy link
Author

saket commented Jan 13, 2019

@Esselans the emulator has become quite fast now. What are your computer specs?

@mvietri
Copy link

mvietri commented Jan 13, 2019

@saket i5 4210, 8gb ram (w10 w/ ssd disk). The emulator takes 10 minutes to start and then it has like a 1.5 - 2 seconds lag.

@saket
Copy link
Author

saket commented Jan 15, 2019

@Esselans that does not sound too bad. Make sure you have hardware acceleration enabled (Intel HAXM) and you're using an x86 image for your emulator. It takes a few seconds on my machine to start.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants