Skip to content
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.

SoftInputMode="adjustResize" doesn't work with MyNavigationDrawerTheme #226

Closed
paolorotolo opened this issue Mar 8, 2015 · 17 comments
Closed

Comments

@paolorotolo
Copy link

Hi!
I noticed that Android can't resize the activity when SoftKeyboard is opened if I'm using your DrawerTheme. All works fine with Lollipop's default theme (applied in styles.xml).

Activity with default theme:
screenshot_2015-03-08-20-25-37

Activity with MyNavigationDrawerTheme:
screenshot_2015-03-08-20-24-52
EditText is below the Soft Keyboard, so the activity wasn't resized.

Best regards,
Paolo

@neokree
Copy link
Owner

neokree commented Mar 8, 2015

could you share your drawer layout please?

@paolorotolo
Copy link
Author

Sure, I uploaded the sources on GitHub: https://github.com/numixproject/org.numixproject.hermes

I'm having this issue with basically all activities especially with ConversationActivity and AddServerActivity.

Thanks again!

@neokree
Copy link
Owner

neokree commented Mar 10, 2015

Well, I didn't understood very well the problem...
When the keybard appears in landscape mode, the layout can't be resized so the edit text required remains under the keyboard?

@paolorotolo
Copy link
Author

Exactly. We're trying to make an IRC client and it's impossible to chat if you don't see the text you're typing. With default theme I've the same behaviour of Hangout or WhatsApp. It just doesn't work with your custom theme.

Thanks again for the help,
Paolo

@paolorotolo
Copy link
Author

Update: it happens both in landscape and portrait mode.

@neokree
Copy link
Owner

neokree commented Mar 14, 2015

Well, sincerily I don't know how "adjustResize" works, I will investigate on that

@paolorotolo
Copy link
Author

UPDATE: It works well with adjustPan (scrolls up ALL the view, even the ActionBar):

Keyboard closed:
screenshot_2015-03-20-18-19-25

adjustPan on:
screenshot_2015-03-20-18-25-38

adjustResize on:
screenshot_2015-03-20-18-19-28

Actually I need Resize, because users should be able to see all messages and ActionBar.

@paolorotolo
Copy link
Author

I think it's an Android bug: https://code.google.com/p/android/issues/detail?id=5497&q=fullscreen&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

AdjustResize doesn't work when activity is full screen. Is MaterialNavigationDrawer using Full Screen activities?

@neokree
Copy link
Owner

neokree commented Mar 20, 2015

no, materialnavigationdrawer use normal actionbar activity without action bar

@josefigueredo
Copy link

Same problem here. Did you find a work arround PaoloRotolo?

@mikepenz
Copy link

mikepenz commented May 3, 2015

@neokree i know this library is similar to my library. But i think it is always good to help each other. The issue you have here is because as soon as you have the FullScreen flag (which is required to get the Drawer below the StatusBar) the adjustResize feature won't work anymore. (Starting with API Level 19)

I have created a small util to get it working in my MaterialDrawer library. You can find an answer about this here: http://stackoverflow.com/a/30019136/325479

@paolorotolo
Copy link
Author

Great, I knew it was something related to Fullscreen activities. :)

@mindrunner
Copy link

Same problem here. What exactly solves it? I have a LinearLayout inside of a Scrollview.
Also I set android:windowSoftInputMode="adjustPan" in Manifest. Still, the Keyboard overlays parts of my view.

@neokree neokree closed this as completed Dec 22, 2015
@mikepenz
Copy link

@mindrunner do you have the KeyboardUtil enabled?

@mindrunner
Copy link

@mikepenz Don't really know. Must have a look at the code first. I am not actively maintaining it at the moment. Can you quickly point me to KeyboartUtil? How to activate it?

@mikepenz
Copy link

@mindrunner oops sorry ignore my comment. I was notified and thought it was an issue on my drawer lib. sorry

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants