开发者

Android CheckedTextView - Set checkMark dynamically

Given this XML property of the CheckedTextView's checkMark:

android:checkMark="?android:attr/listChoiceIndicatorMultiple"

How开发者_运维技巧 can you set the checkMark property dynamically (i.e. from code)? Does Android have any documentation on this?

Using: Android 1.5

Note: I am building a regular jar library that does not have any access to android XML resource files or drawables so everything has to be created programatically.


From the API doc of CheckedTextView, it sounds like the two setCheckMarkDrawable methods would do the job?

You just need to pass in a StateListDrawable.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜