HI, how we can check if VerticalScrollbar is visible or not if we want to use some custom style there ? SO that depending on visibility, we can hide show our custom design
➕ 2
a
Abdelilah El Aissaoui
07/17/2023, 12:03 PM
I've done something similar in the past but I don't remember the code right now. I did something like checking if the first and last items of your list are fully visible.
a
Alexander Maryanovsky
07/17/2023, 8:48 PM
Visible in what sense? Sometimes it’s invisible because it faded away, and sometimes because the viewport is larger than the content.
s
Sunil Kumar
07/19/2023, 4:04 AM
@Alexander Maryanovsky Visibility means, if scroll bar is present or not, When content is smaller than viewpoart, scrollbar is not rendered, right. SO my question was same to detect this if scrollbar is present or not according to content size
a
Alexander Maryanovsky
07/21/2023, 12:20 PM
In
ScrollbarAdapter
you have
contentSize
and
viewportSize
. If the viewport size is greater than or equals to the content size, the scrollbar isn’t displayed.