Constant expression required in Android

You’re encountering the “constant expression required” error because parent.getId() is a runtime value, and switch case labels in Java must…