Before android 15, I used view.rootWindowInsets.getInsets(WindowInsets.Type.systemGestures()).left to get system inset for gesture navigation back gesture.
Because I don’t want my app to respond to user gestures in the area that responds to the system’s back gesture (to preserve the back function, I’m not using the method of blocking the system gesture).
However, when I run the above code on Android 15 Beta 3, under gesture navigation, the size of the side padding area on the left and right is 0 (strangely, in the three-button navigation mode, there are values on both sides). I also tried the way of getting insets in setOnApplyWindowInsets or using WindowInsetCompat, but they didnt work.
How should I get the width of the area for the back gesture in Android 15 Beta 3? Or is this feature not correctly implemented yet, and do I need to wait for the official fix?
贾展博 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.