material-components / material-components/material-components-android

[Search] "Lift on scroll" example from search documentation does not work

Open Beginner friendly
#5,090 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:** The lift-on-scroll example in the SearchBar documentation causes the scrolling view to extend below the window. On a phone this causes the app bar to scroll off instead of lifting.

Image

**Expected behavior:** It should shrink to fit the window. This happens if I replace the SearchBar with a MaterialToolbar.

**Source code:** The last xml snippet in docs/components/Search.md.

**Android API version:** 36

**Material Library version:** 1.14.0

**Device:** Android studio, Fairphone 3.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the last XML snippet in docs/components/Search.md and reproduce the lift-on-scroll example on Android API 36. Check why the scrolling view extends below the window instead of shrinking to fit, then verify that the corrected example keeps the app bar from scrolling off.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
documentation, mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.