currently the support for notch is broken. mainly because we didn't reassign layoutParams to the view so the new params won't apply.
to solved this. I rewritten the logic and improve the notch handling.
fixed the bug that layoutParams is not reassigned
toolbar's background is expanded under the notch area.
always set seekbarCard width to 50% (no matter the OS version) to make room for moveBtnContainer
handles display cutout from every direction
changed some layout attributes
removed seekbarCard vertical margin in landscape mode because we are setting its width 50% anyway.
added a marginBottom to seekbarCard.
changed moveBtnContainer marginEnd to marginRight because we are setting marginRight in the code and marginRight and marginEnd cannot be set at the same time. I also ignored the RtlHardcoded warning because this won't really break RTL support.
test screenshots:
I test some scenarios with notch emulation in the developers options menu.
currently the support for notch is broken. mainly because we didn't reassign layoutParams to the view so the new params won't apply.
to solved this. I rewritten the logic and improve the notch handling.
seekbarCard
width to 50% (no matter the OS version) to make room formoveBtnContainer
seekbarCard
vertical margin in landscape mode because we are setting its width 50% anyway.seekbarCard
.moveBtnContainer
marginEnd to marginRight because we are setting marginRight in the code and marginRight and marginEnd cannot be set at the same time. I also ignored theRtlHardcoded
warning because this won't really break RTL support.test screenshots:
I test some scenarios with notch emulation in the developers options menu.
notch on the top and bottom
notch in the corner: