Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带滚动条的画布(不使用 ScrollView),我需要知道滚动条的尺寸,即宽度和高度。有什么方法可以确定它们吗?谢谢。
您可以使用 View.getScrollbarSize()。它将返回垂直滚动条的宽度或水平滚动条的高度。