Question : getcolor deprecated
Answered by : abdoul
ContextCompat.getColor(context, R.color.color_name)
Source : https://stackoverflow.com/questions/31842983/getresources-getcolor-is-deprecated | Last Update : Fri, 24 Apr 20
Question : getcolor deprecated android
Answered by : kushal
llMain.setBackgroundColor(ContextCompat.getColor(context, R.color.color_name));
Source : | Last Update : Tue, 29 Jun 21