0

In Xamarin Android, how do I get the current theme name programmatically? I need to get the name as a string such as "Theme.AppCompat.Light.Dialog".

1 Answer 1

1

You may refer to the code bellow:

PackageInfo packageInfo; packageInfo = PackageManager.GetPackageInfo(PackageName,PackageInfoFlags.MetaData); int themeResId = packageInfo.ApplicationInfo.Theme; var name = Theme.Resources.GetResourceEntryName(themeResId); 

And here is the reference about how to get theme name in Android project(using java)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.