Open jancborchardt opened 7 years ago
Can you provide example gif of how it looks?
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:
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.
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.
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.
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.
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?