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
.
精彩评论