Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linear progressbars to new material design #7568

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

flofriday
Copy link
Contributor

Description

Updated the progress bars to the new material design progress indicators.
This PR only focuses on the linear progress bars.

Screenshot (before/after):
image

Checklist

@ByteHamster
Copy link
Member

Is there a way to disable the end stop indicators? I see Google added them on purpose to improve accessibility. However, I don't really understand how this improves accessibility. To me, it looks more like something is broken 🤔

@flofriday
Copy link
Contributor Author

Yes we can with app:trackStopIndicatorSize="0dp" which I already used at the player-fragment.

I guess it improves accessibility because the track-color can be quite close to the background color and with the stop indicator it's easier to see where the progress bar ends.
However, I agree that it was unusual at first, but I guess as more apps adopt the new style the more natural it will feel.

Still, it's your call, I'm fine either way.

@ByteHamster
Copy link
Member

Then I think I would prefer dropping the stop indicator for now, until thus becomes more commonly used in other apps. What do you think, @keunes?

@keunes
Copy link
Member

keunes commented Dec 22, 2024

I see the benefit of the stop indicator for accessibility; it makes the ending of an otherwise low-contrast line (the light gray) nicely visible for visually impaired users. However, we don't really need it I think as our total episode time also kinda delineates the end of the line. So I'm fine to remove it (for now).

But the new progress indicator looks nice! (Should the one in the player screen be updated accordingly?)

@flofriday
Copy link
Contributor Author

@keunes I think the component you mean is a slider for which there is also a new design but I'm not yet sure how that would work with the chapter sectioning.

However we could also just style the existing slider to be closer to the new progress indicators.

Copy link
Member

@ByteHamster ByteHamster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments below :) Could you please remove the track stop indicator for now?

android:layout_weight="1"
android:max="100"
android:layout_margin="4dp"
style="?android:attr/progressBarStyleHorizontal" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this style now unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that was needed to tell the native progressbar whether or not it should be linear or circular. But with the new material design there are now to different components.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I was actually thinking of progressBarTheme in styles.xml. Didn't read that line properly. How about that theme? Is that still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not quite sure here. I looked into it set's the colors but from what I can tell it's the default colors anyway because the only component it's applied to doesn't seem to have other colors than the other progressbars. And in any way the new indicators use slightly different colors, so I don't think that's needed any longer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, could you remove it then, please? :) That should simplify the code. (but please first check if removing breaks something with the dynamic Material You colors)

app/src/main/res/layout/feeditemlist_item.xml Outdated Show resolved Hide resolved
@flofriday flofriday force-pushed the new-linear-progress-bars branch 2 times, most recently from c02439d to 212d3f4 Compare December 26, 2024 17:04
@flofriday flofriday force-pushed the new-linear-progress-bars branch from 212d3f4 to 33d9486 Compare December 26, 2024 17:08
@flofriday
Copy link
Contributor Author

Great, I updated the code and it now looks like:

Screenshot 2024-12-26 at 18 09 23

@@ -47,14 +47,15 @@

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

<ProgressBar
<com.google.android.material.progressindicator.LinearProgressIndicator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that this one should be linear?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that seems like an oversight on my end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants