This repository has been archived by the owner on May 1, 2024. It is now read-only.
Implemented colored refresh indicator for ListView pull-to-refresh #2961
Merged
rmarinho
merged 16 commits into
xamarin:master
from
jfversluis:feature/coloredpulltorefresh
Nov 29, 2018
Merged
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
065ea56
Merge pull request #2 from xamarin/master
jfversluis 10e3eb5
Implemented colored spinner for ListView pull-to-refresh
jfversluis 66984a1
Added back default spinner color
jfversluis 599bfd0
Renamed away from "spinner" and did some default value magic
jfversluis f96ec9a
Implemented default color on iOS and right property name on Android
jfversluis 7c1c1a9
Reinstated coloring on listview gallry page
jfversluis ebfce28
Merge pull request #3 from xamarin/master
jfversluis 14adf11
Implemented colored spinner for ListView pull-to-refresh
jfversluis 91cc13d
Added back default spinner color
jfversluis f55fd03
Renamed away from "spinner" and did some default value magic
jfversluis b243de2
Implemented default color on iOS and right property name on Android
jfversluis 9caa00f
Reinstated coloring on listview gallry page
jfversluis 41e6b7d
Added documentation for new property
jfversluis 8da5ab2
Merge branch 'feature/coloredpulltorefresh' of https://github.com/jfv…
jfversluis 02e287e
Merge branch 'master' into feature/coloredpulltorefresh
jfversluis 013c946
Fixed merge boo-boos
jfversluis File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,8 @@ public class ListView : ItemsView<Cell>, IListViewController, IElementConfigurat | |
|
||
public static readonly BindableProperty SeparatorColorProperty = BindableProperty.Create("SeparatorColor", typeof(Color), typeof(ListView), Color.Default); | ||
|
||
public static readonly BindableProperty SpinnerColorProperty = BindableProperty.Create(nameof(SpinnerColor), typeof(Color), typeof(ListView), Color.Black); | ||
|
||
readonly Lazy<PlatformConfigurationRegistry<ListView>> _platformConfigurationRegistry; | ||
|
||
BindingBase _groupDisplayBinding; | ||
|
@@ -217,6 +219,12 @@ public Color SeparatorColor | |
set { SetValue(SeparatorColorProperty, value); } | ||
} | ||
|
||
public Color SpinnerColor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RefreshControlColor? because it could be something different from a spinner in a specific platform. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm makes sense. I was struggling with the name. RefreshControlColor seems to cover it. |
||
{ | ||
get { return (Color)GetValue(SpinnerColorProperty); } | ||
set { SetValue(SpinnerColorProperty, value); } | ||
} | ||
|
||
public SeparatorVisibility SeparatorVisibility | ||
{ | ||
get { return (SeparatorVisibility)GetValue(SeparatorVisibilityProperty); } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think you should use the
Color.Default
and in the renderers you need to capture the default color of the spinner when they are initialised , so if the user changes back to the default color you can set the default color of the platform.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 did
Color.Default
, but then the spinner disappeared for some weird reason, at least on iOS. I'll check it again.