Resource ids cannot be used in switch case
Problem #
In an Android library module, resource id cannot be used in a switch statement This is because switch case require a constant value but resource id in library module is not constant.
Solution #
Replace switch statement with if else statement
Reference #
https://blog.csdn.net/yeluofengchui/article/details/95514835
- Previous: Git ignore tracked files
- Next: Android hide app icon from launcher