Haptic-Apps / Slide

Slide is an open-source, ad-free Reddit browser for Android.
https://reddit.com/r/slideforreddit
GNU General Public License v3.0
1.78k stars 344 forks source link

Scrollbars constantly resize #1569

Closed Gawdl3y closed 8 years ago

Gawdl3y commented 8 years ago

Slide version: 5.3.3-alpha Android version: N Preview 2

The scrollbar in the comments page wildly fluctuates in size based on the size of the comments currently on the screen. This can be fixed on RecyclerView layout managers by calling setSmoothScrollbarEnabled(false). This issue appears throughout the app (submission list, profile comments, inbox, etc), not just the comments. Any time you have entries in a ListView/RecyclerView that aren't constant size, the smooth scrollbar should be disabled.

Gawdl3y commented 8 years ago

Just a heads-up: disabling the smooth scrollbar does come with the downside of making the scrollbar.. well, not smooth. The scrollbar will simply jump to the next position with no animation. This is definitely preferable to a scrollbar that doesn't reliably indicate your position at all due to constant resizing, however.

Nxt3 commented 8 years ago

Let me see how it looks first. I'm testing the changes on the Comments page first. Give me a few.

Gawdl3y commented 8 years ago

The docs describe it better than I do.

Nxt3 commented 8 years ago

I know--I'm actually just having difficulty disabling it. I'm setting mLayoutManager.setSmoothScrollbarEnabled(false); then calling recyclerView.setLayoutManager(mLayoutManager);. The change isn't present though. Working on it.

ccrama commented 8 years ago

I think it's set in the layout XML @Nxt3 , might have to disable it there and enable it programatically

Nxt3 commented 8 years ago

only thing that relates to the scrollbars in the XML is android:scrollbars="vertical". I'll try removing that--but I don't think it matters.

ccrama commented 8 years ago

Yes, that's it

Nxt3 commented 8 years ago

Then nothing changed :|

ccrama commented 8 years ago

Instead, do rv.getLayoutManager().setSmooth...., that might work (after it's set, of course)

Nxt3 commented 8 years ago

It won't let me lol

ccrama commented 8 years ago

It might have to be cast to a LinearLayoutManager

Gawdl3y commented 8 years ago

Off-topic, but you guys should consider using Gitter or Slack for real-time chat. Would probably be much easier for you (fully real-time, push notifications, and all that good stuff), and won't send loads of emails. :P

Nxt3 commented 8 years ago

I'm just not on the IRC chat right now ;)

Alexendoo commented 8 years ago

@Gawdl3y We chat in #slide on Snoonet if you wished to drop by ever

Nxt3 commented 8 years ago

I give up with this. I tried everything I could think of. I almost think we should just remove the scrollbars all together--seeing as how often the height changes.

Controless commented 8 years ago

I don't mind it that much honestly, a lot of other apps experience this issue as well (like IRCCloud). It's certainly better than nothing.

Nxt3 commented 8 years ago

I'm actually working to integrate this MaterialScrollbar library with Slide. It doesn't quite fix this issue, but it at least makes the scrollbar more useful--while adding some better looks to the app and keeping functionality the same.

Gawdl3y commented 8 years ago

@Nxt3 How's that going?

Nxt3 commented 8 years ago

Not too well. See this issue. Maybe you could help me?

ghost commented 8 years ago

I don't know, can he?

dulleh commented 8 years ago

@Nxt3 do you have a branch set up for the MaterialScrollbar changes?

Nxt3 commented 8 years ago

@dulleh Nope. I could never get it working so I trashed the work. It wasn't much code at all; there is something going on with our RecyclerView that messes with that Library, but I never really tried to figure it out.

ccrama commented 8 years ago

So, should this be closed? I don't really see any alternative short of removing the scrollbar all together

Nxt3 commented 8 years ago

Yeah. This isn't going to be possible with a RecylerView. Of all the libraries I could find to achieve this--none of them worked. I'm sure there is a way to fix it, but all things considered--this is out of our control.