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

[LoadingIndicator] Wrong visibililty in code after using hide()

Open
#4,909 2 comments 0 reactions 1 assignee View on GitHub

@pekingme is already working on this.

Since Aug 28, 2025.

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

Description

**Description:**
After https://github.com/material-components/material-components-android/commit/ac82767b5677ef99f2e9e2f7c1a4c7c3c121fea8 we get a wrong behaviour after we call `hide()`.

The visibility should go to `gone` and not to `invisible`

**Expected behavior:**
-

**Source code:**
https://github.com/material-components/material-components-android/blob/ac82767b5677ef99f2e9e2f7c1a4c7c3c121fea8/lib/java/com/google/android/material/loadingindicator/LoadingIndicator.java#L175

**Minimal sample app repro:**
Just call `hide()`. As you can see there is still space where the indicator was because the visiblity is now `invisible` and not `gone`.

**Android API version:**
All

**Material Library version:**
1.14.0-alpha04

**Device:**
All

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.