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

The height of the peeked sheet is too small when the sheet is shown after keyboard is dismissed #84

Closed
raylee4204 opened this issue Nov 19, 2015 · 7 comments

Comments

@raylee4204
Copy link

When the soft keyboard is already showing, and I show the image picker sheet, the height of the peeked sheet is too small that it cuts off the contents initially.

The following is the correct height if the keyboard has been never displayed.
device-2015-11-19-122932

This is what happens when the sheet tries to show while the keyboard is dismissing
device-2015-11-19-122946

@ZacSweers
Copy link
Contributor

What configuration do you have for your activity? AdjustPan? Resize?

@raylee4204
Copy link
Author

It's set to default.But I'm using a transparent theme
On Nov 21, 2015 1:28 AM, "Zac Sweers" notifications@github.com wrote:

What configuration do you have for your activity? AdjustPan? Resize?


Reply to this email directly or view it on GitHub
#84 (comment)
.

@ZacSweers
Copy link
Contributor

Transparent theme shouldn't make a different. What is "default" in this case?

@raylee4204
Copy link
Author

Default as in no specific configuration is set.

On Mon, Nov 23, 2015 at 4:15 PM, Zac Sweers notifications@github.com
wrote:

Transparent theme shouldn't make a different. What is "default" in this
case?


Reply to this email directly or view it on GitHub
#84 (comment)
.

@markrietveld
Copy link
Contributor

This is because the peeked state height is not updated if the height if the entire layout changes while the sheet is open. I'm not sure it should automatically updated on layout, it might lead to jarring visuals. I'm open to arguments for either

In the mean time @raylee4204, I recommend calling setPeekSheetTranslation(pixels) before opening the sheet. This allows you define a good value for your use case in your dimens.xml

@raylee4204
Copy link
Author

@markrietveld I think it should. At least on keyboard open/close event

@ZacSweers
Copy link
Contributor

Folding this into #100 since I think they're probably the same issue.

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

3 participants