There are some methods in android, for example getColor of Resource class, which ask for a Theme parameter. I didn't find a way how to create a Theme instance and therefore don't know what to send to getColor method as a Theme. I know that null is an option but I prefer to understand what can I do with the parameter (the meaning of Theme parameter in getColor method)
If you're just referencing fixed colors from resource xml you won't notice a difference.
However you can use getColor to reference a color selector too, for example:
color/singlecolor.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorPrimary" />
</selector>
In this case there's reference to themed style attribute colorPrimary.
null as theme you will receive value from your applications main themecontext.getTheme you will receive value from your activitys themeOf course your activity needs to have a custom theme that has different colorPrimary than applications theme itself to notice the difference.