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

BottomSheet appears in center of page #191

Open
ampersanda opened this issue Dec 28, 2017 · 0 comments
Open

BottomSheet appears in center of page #191

ampersanda opened this issue Dec 28, 2017 · 0 comments

Comments

@ampersanda
Copy link

I am glad using this library because it's so simple to use. Sometimes, I have a problem with sheet when I after editing field like EditText, the sheet appears above the keyboard which is going to hide but as long as the keyboard hide first, it seems to be fine. My problem solved by hiding the keyboard programatically first then show the bottom sheet

View view = this.getCurrentFocus();
if (view != null) {
  Log.d(TAG, "View is not null");

  InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
    if (imm != null) {
      imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
      bottomSheetLayout.showWithSheetView(view);
    }
}

Maybe this could help others :)

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

No branches or pull requests

1 participant