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
Custom color with ActionBar-PullToRefresh #38
Comments
I'm interested as well. |
Do you have the same problem? |
Yes |
This issue should be opened in the ActionBar-PullToRefresh project. See this sample for xml => https://github.com/chrisbanes/ActionBar-PullToRefresh/blob/master/samples%2Fstock%2Fsrc%2Fmain%2Fres%2Fvalues%2Fstyles.xml In java, try the Hope this will help you both. |
This is how I did it already before when all worked just fine. After just updating the dependency to ActionBar-PullToRefresh (0.9.3 -> 0.9.9) it doesn't work anymore. setProgressBarColor(int) seems to influence only the bar that appears when you pull down, but not the progress bar animation. So ActionBar-PullToRefresh updated its dependency to SmoothProgressBar to 0.4 from 0.2 i think. Do you remember what could have changed in SPB in this version diff that could be the reason for that. |
I was just digging into the commit history of ActionBar-PullToRefresh. Reverting the following diffs, made it working again (progress bar color is set): chrisbanes/ActionBar-PullToRefresh@82154c7#diff-2e76f7a3838388ea1aa4137e97fdef01R232 chrisbanes/ActionBar-PullToRefresh@82154c7#diff-2e76f7a3838388ea1aa4137e97fdef01L369 @castorflex As those changes are merged in from your fork (see commit c443760 in APTR), could you please have a look at it and confirm if reverting those two diffs in ActionBar-PullToRefresh would be fine? |
I made this PR to let devs to use styles for SmoothProgressBars in AB-PTR. It was working well at this time. May be you can share some code? |
Sorry for the late reply. Been at Google I/O and on vacations ;) So these are the methods which I changed in DefaultHeaderTransformer: |
I was talking to Chris Banes recently about ActionBar-PullToRefresh and I decided to continue it with the community at the following fork: https://github.com/SebastianEngel/ActionBar-PullToRefresh/ I updated the projects dependency to smoothprogressbar to 0.5.+, applied my fix for this issue and deployed a snapshot. Please try it out and let me know what you think and if anything else should go into a release. To use the snapshot add the snapshot repository to your list of repositories like this: Then define the dependency like this: |
Can you share a sample that doesn't work? I just tested the old commit and it seems perfect using |
While building a showcase project I think I found the real problem. Before I was always only using the "ptrProgressBarColor" attribute. And this always worked fine. Since the last release of ActionBar-PullToRefresh this only tinted the bar that is shown while swiping down, not the SmoothProgressBar. The solution is to use "ptrSmoothProgressBarStyle" additionally and define "spb_color" in it. So all good, I will revert my commit. Thanks |
Yeah :) |
ActionBar-PullToRefresh is deprecated (https://github.com/chrisbanes/ActionBar-PullToRefresh) but I have a problem with the progress bar color.
The custom color doesn't work since v0.9.9 (default blue). It was ok with v0.9.3.
ActionBar-PullToRefresh changes the color with this code:
https://github.com/chrisbanes/ActionBar-PullToRefresh/blob/master/library/src/main/java/uk/co/senab/actionbarpulltorefresh/library/DefaultHeaderTransformer.java#L375-L384
The dependency for SmoothProgressBar has changed between v0.9.9 and v0.9.3:
chrisbanes/ActionBar-PullToRefresh@8312bcd
Can you help me?
The text was updated successfully, but these errors were encountered: