Asad
Asad

Reputation: 1

How to implement theme appearance setting like YouTube in your android studio project

I am creating an app in android studio using java , I want to create a theme appearance setting like YouTube where user have 3 options to select one of them... 1) Use device theme 2) Dark theme 3) Light theme. But I don't know how to implement it in java activity and xml activity, can anyone help me ?

here I am attaching screenshot of what I want. enter image description here

Upvotes: 0

Views: 121

Answers (2)

Yegorf
Yegorf

Reputation: 400

It is calls Dialog with radiobuttons. All about it + implementation example - https://suragch.medium.com/adding-a-list-to-an-android-alertdialog-e13c1df6cf00

Upvotes: 0

A. Patrik
A. Patrik

Reputation: 1692

Here's a comprehensive description of how you might achieve that using XML layouts and styles: https://developer.android.com/guide/topics/ui/look-and-feel/darktheme

If you're completely new to XML theming in Android, then watch this video first: https://www.youtube.com/watch?v=Owkf8DhAOSo

Upvotes: 0

Related Questions