DEV Community

Mayank
Mayank

Posted on

Answer: How to get boolean from custom boolean attribute for current theme?

Thanks to @mike M. for the comment

Blockquote "The data field holds 0 or 1 that was originally specified as "false" or "true"." – https://developer.android.com/reference/android/util/TypedValue#TYPE_INT_BOOLEAN

Document says that it returns 1 for true and 0 for false. But when I test it returns -1 for true and 0 for false.

Top comments (0)