开发者

android custom text view can not be added in layout file

I have created a custom text view just to solve the problem in my previous que开发者_运维知识库stion

I have gone through many tutorials and many samples. I have created a custom text view but it can not be added into any layout file. It just throws an error on layout file stating that the class is not found. However I have written the same class.

What i want to know is what should i need to take care when i am creating a custom text view? My only requirement to create a custom text view to have the arial fonts in all text views i use. And extend this facility for button views also.

Thanks


You just add your view with full package name and class:

<org.path.to.MyTextView
android:id="@+id/MyTextView" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜