I want to know when to use ContextCompact
class in an application. Basically what is it used for and when to use it? I have read developers site, it says Cont
basically according to the official developer site it is a Helper for accessing features in Context introduced after API level 4 in a backwards compatible fashion.
You can look into this link for more details. https://developer.android.com/reference/android/support/v4/content/ContextCompat.html
Basically getBackgroundResource or getColor method are deprecated and using ContextCompact is an alternative for that. I hope this helps.