Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

[UI] Scroll bar changes its size in conversation view

Open zebra-ok opened this issue 11 years ago • 7 comments

When scrolling through a conversation, the scroll bar changes continuously its size. Expected behavior: Constant size of scroll bar, just like in the message view

GIF:

animated

Device info: Nexus 5, OmniROM 5.1, TextSecure 3.6.0

zebra-ok avatar Dec 01 '15 21:12 zebra-ok

I can confirm this. It is also not the case that old messages get unloaded and thus the scrollbar becomes larger. This becomes obvious if you look at the scrollbar of a longer conversation.

heyimgay avatar Dec 01 '15 23:12 heyimgay

It seems that the length of the scrollbar increases with the number of message items that are currently visible on the screen. So it is shorter if you are seeing images or multi-line messages.

cascheberg avatar Dec 02 '15 00:12 cascheberg

https://www.quora.com/Why-hasnt-Google-fixed-the-scrollbar-length-problem-in-Android

unrulygnu avatar Dec 02 '15 06:12 unrulygnu

Did a quick peek to investigate this.

Relevant class / layout ConversationFragment.java | conversation_fragment.xml

At a glance, it doesn't look like AbsListView#setSmoothScrollbarEnabled(boolean) will work because this layout is using RecyclerView.

Looks like this may have to wait until RecyclerView is enhanced per this issue to include setSmoothScrollbarEnabled or some equivalent.

iambmelt avatar Dec 10 '15 18:12 iambmelt

setSmoothScrollbarEnabled(false) makes the scrollbar movement twitchy and distracting, probably not the desired user experience.

And if you look at the source for LinearLayoutManager#computeScrollExtent, you'll see that the scrollbar thumb height still varies, despite what the docs say.

I tested this a couple of weeks ago in ConversationFragment#onCreateView, right after layoutManager is declared and initialized. There was much sadness.

To do this right, I believe we would need to compute the total height of the rendered list: an expensive proposition. Any estimating or other workarounds will probably just result in other misbehavior, especially noticeable at the top or bottom of the list.

unrulygnu avatar Dec 11 '15 04:12 unrulygnu

maybe this can be fixed by adding fast scroll to #4696

Can't remember that I've seen that the fast scroll bar changes size

McLoo avatar Dec 11 '15 08:12 McLoo

GitHub Issue Cleanup: See #7598 for more information.

automated-signal avatar Apr 02 '18 23:04 automated-signal