-
Notifications
You must be signed in to change notification settings - Fork 41
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
Does not work with translucent status bar Activities. #12
Comments
Were you able to check if any other ViewGroup gets resized? Afaik fullscreen activities aren't resized, but this sounds different |
Nope. none of the viewgroup gets resized. |
Does setting |
Nope. The above screenshot is with |
Ah okay. I'm afraid I don't have any answers for this ¯\(ツ)/¯ |
Hi. It seems that, when using "android:windowTranslucentStatus" in theme, android does not resize any views, but adds bottom padding to a root view of your activity (not content view, but root view). Don't know why, it doesn't seems like right thing to do, but they did it that way. I still manage to detect keyboard change and animate it by animating bottom margin to the opposite direction of bottom padding, but it seams to hacky so I would not recommend it. EDIT: Actually, bottom padding not necessary applied on root view, but on a view that has fitsSystemWindows properties set on true. |
Yea this whole implementation was a giant hack anyway. Hopefully we won't have to do any of this once |
I've faced problem when resizing don't work with decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN. So this article helped me to solve the problem https://medium.com/@sandeeptengale/problem-solved-3-android-full-screen-view-translucent-scrollview-adjustresize-keyboard-b0547c7ced32 |
I got an idea form drakeet, you can see if it helps. set the target activity's windowSoftInputMode as adjustNothing, then add an invisible window on the top of the activty, and set the window's windowSoftInputMode as adjustResize, when the keyboard visibility changes the window size will change too, so we can know the keyboard show or hide according to the window's size change, then wo can tell activity to do the size changing animation. |
If you add
<item name="android:windowTranslucentStatus">true</item>
to your activity theme, the animation does not work. Reason is FrameLayout(android.R.id.content) does not get resized in case of such activities.The text was updated successfully, but these errors were encountered: