Skip to content
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

About windowSoftInputMode, DrawerLayout and issue #95 #183

Closed
raguirre opened this issue Apr 4, 2015 · 10 comments
Closed

About windowSoftInputMode, DrawerLayout and issue #95 #183

raguirre opened this issue Apr 4, 2015 · 10 comments

Comments

@raguirre
Copy link

raguirre commented Apr 4, 2015

First of all, Mike you are a genius for solving issue #95. I'm so thankful you solved it, I've been banging my head for 3 days now trying to understand just what was happening.

Seeing what Google is doing with most of its apps, there is no reason to completely remove the drawer from an activity that makes use of the keyboard, but if they are doing it it just seems to me they're aware of the situation, and along with the fact that nowhere in the documentation could I find that these 2 scenarios are incompatible, leads me to believe that this is a genuine bug within DrawerLayout. This, and the fact that I tested an activity without a drawer but with translucent status bar and it resized without a problem. I will look into it and see if I can file a bug.

Here's my request:
I would like an instance of the KeyboardUtil to be added by default to all new drawers being created. From what I can tell, there's no downside to it. This way, people who have no idea about the bug won't even realize there's a bug at all.

If there is indeed a downside to it, then I think it would be just fair to put a warning in the readme or a mention about it in the wiki. After hours of Google searches I could not find anywhere that the bug was related to DrawerLayout. I was just lucky enough to find that you had already hacked it.

Nevertheless, thanks again for solving the issue and for making this amazing library.

EDIT:
Okay nevermind, after further testing of the KeyboardUtil in my main activity which holds a ViewPager, I do see some noticable frame drops when I scroll around the different pages because of the OnGlobalLayoutListener. So I thought it would be a good idea to have the option to add and remove the listener on demand, as it could only be needed in some fragments, and removing it while it's not needed will improve performance. Something like activateListener() and deactivateListener(). Thanks :)

@mikepenz
Copy link
Owner

mikepenz commented Apr 5, 2015

@raguirre thanks for the detailed description.

When i tried to solve this issue i also searched a lot for any documentation or solution how to solve it. but it seems that as soon as you use a newer api version and the FULLSCREEN flag that any functionality of the keyboard stuff like adjustView won't work anymore.

So it really makes sense to add this to the drawer you are right. having a keyboard is a common task and if there are issues people won't find the solution. (or they search for 4+ hours)

i was afraid adding it as default because i did not know if it will cause any troubles. but for now it seems really stable.

so adding it with the mentioned methods makes sense ;). i will add them in the next version.

i see something like.

Drawer.Result result = ...
result.enableKeyboardSupport(activity)
result.disableKeyboardSupport(activity)

@mikepenz mikepenz self-assigned this Apr 5, 2015
@raguirre
Copy link
Author

raguirre commented Apr 5, 2015

@mikepenz thanks for the reply.

It was the best you could have done not adding it by default, cause it breaks other things, like viewpager pagination. Since the post I also realized it broke the animation in my sliding tabs (indicator for the viewpager), now they just move from one tab to the next without animating.

And yeah, methods working directly on the Drawer.Result sound great :)

Thanks and looking forward to the next version :)

@mikepenz
Copy link
Owner

mikepenz commented Apr 6, 2015

@raguirre with the next version there will be a method called

result.keyboardSupportEnabled(activity, true);

you can disable it again with this:

result.keyboardSupportEnabled(activity, false);

@mikepenz mikepenz closed this as completed Apr 6, 2015
@raguirre
Copy link
Author

raguirre commented Apr 6, 2015

@mikepenz Awesome! Thank you very much. :)

@mehdinewdesign
Copy link

hi Dear Mike

i saw your library and i installed your application,i'm new android developer and i cant use this library!

may you help me with an step by step guidance for use your library?

thanks...

@mikepenz
Copy link
Owner

mikepenz commented May 3, 2016

@mehdinewdesign there is the sample app available showing how the lib is used, you also can see how the MaterialDrawer needs to be setup in the README.

No step by step guidance possible.

@mehdinewdesign
Copy link

Thank you...

@mehdinewdesign
Copy link

Hi
I just want to use your minidrawe and I can't find out how to do this...

Additionally I read the README file and it can not help me...

May help me for this go?

Thank you...

@mikepenz
Copy link
Owner

mikepenz commented May 4, 2016

@mehdinewdesign not sure why you ask this inside an issue which has nothing to do with your question. Here you can find the sample app: https://github.com/mikepenz/MaterialDrawer/tree/develop/app including a sample for MiniDrawer

@mehdinewdesign
Copy link

Hi
Dear Mike,I'm sorry because of my continuously questions , but really I cant use your sample and your library :-(
Did your have any learning lecture about mini drawer in YouTube?
Your design and programming for this sample is awesome , but because of I'm new in android programming I cant use this...

I'm so eager for your answer that make me guide for creating a mini drawer.

Thank you so much... :)

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

No branches or pull requests

3 participants