[Android Material] Linear Progress Indicator #5079
[Android Material] Linear Progress Indicator #5079
Conversation
@paymicro can you rebase this to master when you get a chance? |
build --uitests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what the reason was to drop the appcompat and go completely custom?
I am worried that we are doing all this work, and then when we get the actual implementation from Google - which is planned - we will have a totally different look.
And then, totally separate - we are dropping the material design guidelines. The whole material thing is to be strict and when the user sets a color, this is set for the whole control. If I want a purple control, then everything is purple. Shouldn't we, as the implementors, restrict what the user can do? What is the point of material guidelines if we don't follow them? Of course, the user can do what they want...
|
||
namespace Xamarin.Forms.Platform.Android.Material | ||
{ | ||
public class MaterialProgressBarRenderer : AProgressBar, | ||
IVisualElementRenderer, IViewRenderer, ITabStop | ||
{ | ||
const float BackgroundAlpha = 0.3f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did we get this value from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay. Google. This is typical for Material - neither platform matches the spec.
<style name="XamarinFormsMaterialProgressBarHorizontal" parent="android:Widget.ProgressBar.Horizontal"> | ||
<item name="android:indeterminateOnly">false</item> | ||
<item name="android:minHeight">4dp</item> | ||
<item name="android:progressDrawable">@drawable/MaterialProgressBar</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you opt to use the base control and a custom drawing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just got reminded by Shane, Google has a HARD set for 4dp. Of course, this is absolutely not true for iOS, but hey, why follow your own guides.
@paymicro Could you attach screenshots of before/after to the issue for comparison and records (for when Google breaks the controls and the style suddenly changes under us)? |
Xamarin.Forms.Platform.Android/Resources/drawable/MaterialProgressBar.xml
Show resolved
Hide resolved
Merged this into the material branch for the slider / progress as they are the same control and I want to reuse some of the coloring code. (and the nice gallery) |
* [Android Material] Linear Progress Indicator (#5079) Merging into the material "slider" / "progress" bar branch so that we can share some code as they are the same control * [Material] [Slider, ProgressBar] Updated the progress bard and added the slider * Renamed the gallery fixes #5008 fixes #5079 fixes #5018
Description of Change
fixes Linear Progress Indicator
Issues Resolved
API Changes
None
Platforms Affected
Before/After Screenshots
Not applicable
Testing Procedure
PR Checklist