我已经创建了一个继承自TextView的类,所以现在我必须使用我的实现:
<cdz.chapitreUn.preums.BoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
tools:context=".PreumsActivity" />
在xml文件上。事情是这是一个非常长的语法,包括类的路径,无论如何(别名或别的东西)我只能写:
<BoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
tools:context=".PreumsActivity" />
谢谢