Scalified / fab

Floating Action Button Library for Android
Apache License 2.0
849 stars 164 forks source link

fabicon not hidden behind when keyboard is diplayed #22

Closed aniruddhasm closed 9 years ago

aniruddhasm commented 9 years ago

Hello,

I am trying to implement the library but when I click on the searchbar in the toolbar the keyboard pop ups & the fab icon is above the keyboard as it should be hidden behind the keyboard like the gmail app.

I've attached the screenshot of the error http://s3.postimg.org/i73vb2f4j/Untitled1.png

Any help is appreciated Thanks,

vbaidak commented 9 years ago

Hi aniruddhasm,

This is the expected behavior. ActionButton does know nothing about any search views changes and indeed should not be aware of.

Please use hide() method on ActionButton to hide it when you need. If you are using Android Search Interface you can get it work in such way:

// whatever code goes here

@Override
public boolean onSearchRequested() {
    actionButton.hide(); // hide when search requested
    return super.onSearchRequested();
}

This is an example and thus in your case thing might go different, however the concept must be the same

Remember that:

ActionButton gives you a way to manage itself. It is up to you HOW would you decide to.

aniruddhasm commented 9 years ago

Thank you very much for your quick reply

It is not working I've added the above code below

protected void onCreate(Bundle savedInstanceState) {}

@Override public boolean onSearchRequested() { actionButton.hide(); // hide when search requested return super.onSearchRequested(); }

but it never gets called. I want to hide it as sson as I click the search icon & show after I click the back button to collapse the search viw

vbaidak commented 9 years ago

What search engine are you using?

Post here the Activity code please or send me it to com.software.shell@gmail.com

vbaidak commented 9 years ago

Issue solved