-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use WindowCompat. #8894
Use WindowCompat. #8894
Conversation
4d091e2
to
7ee2f51
Compare
ae43583
to
8818c4b
Compare
8818c4b
to
1878d17
Compare
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fullscreen the system back&home&recent buttons do not show up when the system ui is shown. I could reproduce on API 27 and 30. I was completely unable to test on API 22 as the player seems to crash when going fullscreen...
Search and keyboard seem to work normally.
In each place where you switched from flags to WindowCompat
, could you explain why you expect the two code snippets to do the same thing? I.e. which flag turned into which WindowCompat
call, ...
I didn't encounter that issue when I tested the changes on my end. I'll check again, thanks for the info.
Sure, the https://developer.android.com/reference/androidx/core/view/WindowCompat#setDecorFitsSystemWindows(android.view.Window,boolean) |
It was already like that in the main player UI (it only shows the status bar when tapping the video view). |
2e2a2e7
to
8d39522
Compare
Okay, thanks. I checked on an API 23 emulator and it didn't show the navigation bar (I probably didn't deploy the dev branch correctly). I'll update the flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else seems to work fine now though
@@ -662,15 +662,14 @@ private void showKeyboardSearch() { | |||
if (DEBUG) { | |||
Log.d(TAG, "showKeyboardSearch() called"); | |||
} | |||
KeyboardUtil.showKeyboard(activity, searchEditText); | |||
KeyboardUtil.showKeyboard(getActivity(), searchEditText); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The keyboard does not show up when you tap on "search" anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird. I checked on API 23 and 31, and the keyboard showed up on both when selecting the search icon.
Update: I think I know what you mean, the cursor isn't showing up in the search bar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used API 33, and the keyboard itself wouldn't open
23c7a1b
to
15142a8
Compare
if (!imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED)) { | ||
/* | ||
* Sometimes the keyboard can't be shown because Android's ImeFocusController is in | ||
* a incorrect state e.g. when animations are disabled or the unfocus event of the | ||
* previous view arrives in the wrong moment (see #7647 for details). | ||
* The invalid state can be fixed by to re-focusing the editText. | ||
*/ | ||
editText.clearFocus(); | ||
editText.requestFocus(); | ||
|
||
// Try again | ||
imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we can remove this safely? #7647
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the linked issue. The issue reoccurred on an API 23 emulator, so I reverted it. Only the system UI visibility flags have been replaced.
15142a8
to
f766ef2
Compare
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patience
What is it?
Description of the changes in your PR
WindowCompat
to replace the deprecated UI visibility flags.Fixes the following issue(s)
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence