How do we get the topic of activity?

I am trying to determine the theme used for the action, but so far I can only find this for the whole application? Is there any way to do this?

+5
source share
2 answers

Just call the getTheme () method in your activity. For instance.

public class MainActivity extends PreferenceActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Theme theme = this.getTheme();
    }
}
+8
source

My first thought would be ContextThemeWrapper.getTheme () , since ActivityextendsContextThemeWrapper

+7
source

All Articles