I'm trying to create a rotating imageView. Looking at this (http://stackoverflow.com/questions/1930963/rotating-a-view-in-android) I know I'll have to override onDraw.
But when I create my own derrived TextView class, how do 开发者_运维问答I use it in my xml layouts?
To use it in your xml layout add the following:
<view class="yourpackage.yourclass.yourview" ...additional parameters... />
note the lowercase "view" or by directly specifying its name
<yourpackage.yourclass.yourview ...additional parameters... />
How to create and access custom components is discussed here
http://developer.android.com/guide/topics/ui/custom-components.html
精彩评论