slapperwan / gh4a

Github client for Android
Apache License 2.0
1.73k stars 221 forks source link

Loading line has distance from header #728

Open jancborchardt opened 7 years ago

jancborchardt commented 7 years ago

In other Android apps, for example Nextcloud, the loading line on the top is nicely part of the header, directly below it.

In Octodroid there's a bit of distance between header and bar. Is it possible to combine both for a simpler look?

Tunous commented 7 years ago

Can you provide example gif of how it looks?

jancborchardt commented 7 years ago

See this comparison. Left the Nextcloud app with the loading bar directly as part of the header. The distance between the header and loading bar in Octodroid is illustrated with the red block: loading bar android

maniac103 commented 7 years ago

That Nextcloud example indeed looks great, I think it will not be straightforward to replicate though, as Octodroid's progress bar actually has two instances: one in the activity, and one in the fragments. For a number of activities (e.g. repo overview) we first show the former (while keeping the fragments hidden) and then the latter while fragments are loading their data. At this point I'm not sure whether we can move the fragment ones up; if we can, I'm all for doing it.

Tunous commented 7 years ago

Yes it'll be complicated to implement this for fragments. Especially in ViewPager where the loading bar moves with each fragment. I don't have any ideas how to workaround that.

maniac103 commented 7 years ago

We'd probably need some callback mechanism between fragments and their hosting activity, where the activity shows the progress bar as long as at least one fragment is still loading. Maybe we'd also need to hide all fragment's content until all are done loading in that case?

FWIW, simple diff to remove the padding and drop the darker color: https://pastebin.com/bw3M1nR3 ... not sure what to think of the visual effect yet.

Tunous commented 7 years ago

I don't like it because it appears under shadow which makes it much darker than the toolbar. The current version is better as the shadow doesn't affect it that much.