开发者

Android: Create a CheckedTextView dynamically

开发者 https://www.devze.com 2022-12-16 04:44 出处:网络
How can you dynamically create a CheckedTextView in android [without creating a new implementation]? It seems CheckedTextView is abstract ... (which does not make any sense at all) because I keep get

How can you dynamically create a CheckedTextView in android [without creating a new implementation]?

It seems CheckedTextView is abstract ... (which does not make any sense at all) because I keep getting the compile time error: "Cannot instantiate the type CheckedText开发者_JAVA百科View"

Using Android 1.5


Looking at the docs, the class is not abstract and has constructors. Presumably, therefore, you can call:

new CheckedTextView(this);

where this is your Activity, and get a CheckedTextView.

Have you run into problems using this?

0

精彩评论

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

关注公众号