Skip to content

Gallery: sometimes, on Android, the word "Demos" is half-way under the app bar on launch #5368

Closed

Description

@sethladd

Running on 5X, built with --release.

Sometimes, not always, on a fresh start, I see this:

screen shot 2016-08-12 at 11 23 33 am

Notice that the word "Demos" is half-way under the app bar.

Scrolling up and down doesn't fix it. Tapping into a vignette and then tapping back will fix it.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    customer: galleryRelating to flutter/gallery repository. Please transfer non-framework issues there.
    on Aug 12, 2016
  2. abarth commented on Aug 12, 2016

    @abarth
    Contributor

    I've seen this too. It appears to be some sort of race condition during startup.

  3. HansMuller commented on Aug 12, 2016

    @HansMuller
    Contributor

    This looks like a consequence of MediaQuery.of(context).padding.top returning zero

  4. abarth commented on Aug 12, 2016

    @abarth
    Contributor

    Maybe we don't initialize the padding early enough? I would have expected the layout to update when the padding changes to its final value... Is there a missing dependency with the scaffold's custom layout somehow?

  5. abarth commented on Aug 12, 2016

    @abarth
    Contributor
      @override
      bool shouldRelayout(_ScaffoldLayout oldDelegate) {
        return padding != oldDelegate.padding;
      }
    

    That looks right...

  6. HansMuller commented on Aug 12, 2016

    @HansMuller
    Contributor

    Maybe it is possible for Engine::OnViewportMetricsChanged() to have been called after the scaffold has looked up the window padding as well as not triggering a rebuild?

    Note also: So far I haven't been able to reproduce the problem and verify that the source is in fact the window padding being zero. This may all be idle speculation.

  7. added this to the August milestone on Aug 15, 2016
  8. sethladd commented on Aug 15, 2016

    @sethladd
    ContributorAuthor

    Another user stopped by my desk today and pointed this out :)

  9. jason-simmons commented on Aug 18, 2016

    @jason-simmons
    Contributor

    I can reproduce this easily on the Android emulator

  10. HansMuller commented on Aug 18, 2016

    @HansMuller
    Contributor

    Jason and I just sorted this out.

    When running on the Android emulator and occasionally when running Android native, MediaQuery.of(context).padding.top is zero when it's called at Widget initState() time. Calling it at build() time instead appears to consistently return the status bar's actual height.

  11. self-assigned this
    on Aug 18, 2016
  12. github-actions commented on Sep 6, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

customer: galleryRelating to flutter/gallery repository. Please transfer non-framework issues there.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions