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

[TimePicker] Support different styling for the Ok/Cancel buttons

Open
#2,091 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request Needs Investigation
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

The date picker supports different styling of the ok/cancel buttons through it's buttonBarPositiveButtonStyle and buttonBarNegativeButtonStyle. Seems like the time picker does not, both buttons are styled with the same style: borderlessButtonStyle

Is there a way around this without using reflection? See below my desired styling of the picker buttons.

2021-02-21_20h04_40
2021-02-21_20h04_58

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 by comparing the TimePicker and DatePicker button styling APIs, especially buttonBarPositiveButtonStyle and buttonBarNegativeButtonStyle, to locate where the TimePicker currently applies borderlessButtonStyle. Confirm the work is done when Ok and Cancel can receive separate styles without reflection and the existing DatePicker behavior remains consistent.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.