3
Whenever I have saved the image associated with a checkbox through the method imagem = minha_checkbox.getButtonDrawable();
always gives me a mistake called call requires API level 23 (current min is 17)
How can I fix this?
3
Whenever I have saved the image associated with a checkbox through the method imagem = minha_checkbox.getButtonDrawable();
always gives me a mistake called call requires API level 23 (current min is 17)
How can I fix this?
5
The method getButtonDrawable() was only introduced in the Checkbox(Compoundbutton) class in version 23 of the API.
Has two solutions:
android:minSdkVersion="23"
). Refers to the class Compoundbuttoncompat and uses its static method getButtonDrawable():
imagem = CompoundButtonCompat.getButtonDrawable(minha_checkbox);
Note: Requires Android Support Library, Revision 23.0.1 or higher.
Browser other questions tagged android checkbox
You are not signed in. Login or sign up in order to post.