Answers for "android read resource color"

1

how to get color from resource android

In activity :
	ContextCompat.getColor(actvityname.this, R.color.your_color);
    
In fragment :
	ContextCompat.getColor(getActivity(), R.color.your_color);

Another method :
	getColor(R.color.snackBarAction)
Posted by: Guest on November-03-2021

Code answers related to "android read resource color"

Browse Popular Code Answers by Language