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

[MaterialButton] Background color different on short & long click

Open
#3,320 3 comments 0 reactions 0 assignees View on GitHub
bug Widget: Button
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:** Full description of issue here
The background color of `MaterialButton` (using `@style/Widget.MaterialComponents.Button.OutlinedButton`) on short-click and long-click is different

On short click:
![image](https://user-images.githubusercontent.com/42742240/228124923-6f6cf7af-5a15-4c8c-bb92-08461d605461.png)

On long click
![image](https://user-images.githubusercontent.com/42742240/228124986-8c24b98d-5664-4c1a-8933-d415bf498983.png)

**Expected behavior:** Screenshots and/or description of expected behavior
The background color should be the same for long click and short click, or an option should be there to have them look the same

**Source code:** The code snippet which is causing this issue
```xml

```

**Android API version:** The device was running android v7.1.2

**Material Library version:** `com.google.android.material:material:1.8.0`

**Device:** model is a5dwg

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior with the provided MaterialButton XML, using the OutlinedButton style on Android 7.1.2 and material version 1.8.0. Compare the short-click and long-click states, then confirm that the background color is consistent or that an option exists to make the states match.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.