Dynamically find the theme name in Android application
<p>I have a tablet application which I am rebranding so there are multiple themes, based on the type of user. </p>

<p>I'd like to find the name of the theme that is currently being applied, and based on that theme then I can do some back-end functionality changes.</p>

<p>I have to dynamically set some image resources, which is fine as long as I pass in the correct theme resource (the R.style.redtheme), but I'd like to set this dynamically.</p>

<pre><code>TypedArray a = getTheme().obtainStyledAttributes(R.style.redtheme, new int[] {aTabResource.mDrawableAttrId});
</code></pre>

<p>To do the styling I'm creating custom attributes and then overriding them in the styles.</p>

<p>If there is no simple way to get the theme, I will just save a preference. </p>
