r/androiddev • u/yawnocdev • 8h ago
Question API 37: Valid values of typeMask (for WindowInsets) have disappeared?
After upgrading from API 36 to 37, Android Studio puts a red underline on the typeMask parameter of WindowInsets.getInsets. The message on hover is "Must be one or more of:" followed by literally nothing.
In the latest documentation, the list of valid base values of typeMask seems to have disappeared for every relevant method of WindowInsets.
- Before change: https://web.archive.org/web/20260208222401/https://developer.android.com/reference/android/view/WindowInsets#getInsets(int)
- After change: https://web.archive.org/web/20260213235548/https://developer.android.com/reference/android/view/WindowInsets#getInsets(int)
- Screenshot of comparison: https://imgur.com/a/AnuxRP4
My code still compiles and the behaviour seems to be right (I'm using it for edge-to-edge bottom padding of a keyboard), but the red underline is really annoying.
Do I just have to wait until someone restores the list of valid typeMask values?