androidx / androidx/media

Ability to set Dialog for TrackSelectionDialogBuilder

Open
#1,058 5 comments 0 reactions 1 assignee View on GitHub

@oceanjules is already working on this.

Since Feb 7, 2024.

enhancement low priority
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

[REQUIRED] Use case description

Currently TrackSelectionDialogBuilder uses either androidx.appcompat.app.AlertDialog$Builder or AlertDialog.Builder in the build(). My app is using Material3, but other people might be using Material2 or even there own theme.
My current issue is that I can't theme the Dialog to Material3 even when using the setTheme().

Proposed solution

I'm proposing to either add a new constructor which could take in an object extending AlertDialog.Builder or adding a new setter to do so.
There is even a solution of making TrackSelectionDialogBuilder an abstract class and let the users implement their own which would shift the issue of displaying the right dialog/theming onto the user.

Note: I could propose a PR for the selected solution

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.