有没有办法WindowInsets在活动创建之后很长时间内获取活动,而无需坚持或以其他方式缓存它?
例如.
WindowInsets insets = getWindow().getWindowInsets();
myUseCaseView.setPaddingTop(insets.getSystemWindowInsetTop);
Run Code Online (Sandbox Code Playgroud)
是的: getWindow().getDecorView().getRootWindowInsets()
| 归档时间: |
|
| 查看次数: |
971 次 |
| 最近记录: |