开发者

How do I find android method constants (or, how to use android.com)

I've had trouble using developer.android.com as a reference. Is it incomplete, or do I just need some advice on how to use it, or is there a better reference?

for example: for the "TextView.BufferType" method, I can't find out on developer.android.com what are the possible variables. I know of "EDIT开发者_高级运维ABLE", but what are the others? The android.com reference to TextViewBufferType gives no clues.


First of all, BufferType is not a method, it's an enum.

You'll also see on top that there is an XML attribute called buffer type, and it is listed to have three states here: normal, spannable, editable, and you have those equivalents in the BufferType enum (in all upper-case, of course).


EDITABLE, NORMAL, and SPANNABLE. They seemed to have nuked the "Enum Values" section in all HTML documentation in the 3.0 release. They still exist in Google's cached copy, though (as of 2/25/2011): http://webcache.googleusercontent.com/search?q=cache:http://developer.android.com/reference/android/widget/TextView.BufferType.html

You can also still see the available values in Eclipse's autocomplete, and obviously they're there if you check out the actual AOSP source code (highly recommended). Why they removed useful web documentation on enums is beyond me, though.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜