Kotlin: Styling Text in Snackbar with SDK later than 28
I am working on a Kotlin project and I wish to style the text in a Snackbar, specifically the text font. I have been to many websites that address this problem, but they all use this line in the Snackbar body:
val snackbarTextView = snackbar.view.findViewById(android.support.design.R.id.snackbar_text) as TextView
The problem setting the TextView with this code, is that it only works if your project targets SDK 28 or older, and legacy libraries are enabled. I am targeting SDK 30 and then the...