Since the textFontWeight
attribute is API level 28 and higher a workaround for supporting older devices is to create a separate fontFamily for each font-weight and reference the fontFamily from the View.
res/layout/your_layout.xml
res/font/fontFamily_your_font_bold.xml