java– 什么是WindowInsets?

java– 什么是WindowInsets?,第1张

概述我正在尝试了解Android *** 作系统,当我阅读GoogleI/O2014应用程序时,我遇到了WindowInsets.如果有人能解释他们是什么,那将是一个很大的帮助.谢谢.解决方法:您可以了解所有关于WindowInsetshere.WindowInsets为您提供窗口中可供应用程序使用的区域.它本身并没有多大用处.当您重

我正在尝试了解Android *** 作系统,当我阅读Google I / O 2014应用程序时,我遇到了WindowInsets.如果有人能解释他们是什么,那将是一个很大的帮助.谢谢.

解决方法:

您可以了解所有关于WindowInsets here. WindowInsets为您提供窗口中可供应用程序使用的区域.它本身并没有多大用处.当您重写VIEw.onApplyWindowInsets或实现VIEw.OnApplyWindowInsetsListener时,它的真正目的就出现了.你可以在这里阅读它们:View.onApplyWindowInsets和View.OnApplyWindowInsetsListener

Listener for applying window insets on a vIEw in a custom way.

Apps may choose to implement this interface if they want to apply
custom policy to the way that window insets are treated for a vIEw. If
an OnApplyWindowInsetsListener is set, its onApplyWindowInsets method
will be called instead of the VIEw’s own onApplyWindowInsets method.
The Listener may optionally call the parameter VIEw’s
onApplyWindowInsets method to apply the VIEw’s normal behavior as part
of its own.

简而言之,覆盖它将允许您控制可用于VIEw的窗口区域.

总结

以上是内存溢出为你收集整理的java – 什么是WindowInsets?全部内容,希望文章能够帮你解决java – 什么是WindowInsets?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1103707.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存