I have theme that specifies textColor for TextView as red.
I am using LayoutInflater to instantiate TextView. The problem is that styles are not applied to TextView
You probably use a context that isn't one that has a theme.
To solve it, use something as such:
val inflater= LayoutInflater.from(context).cloneInContext(ContextThemeWrapper(context, R.style.some_activity_theme))
You can read more about this here