i am using the chrisbanes / ActionBar-PullToRefresh from this link https://github.com/chrisbanes/ActionBar-PullToRefresh and i have created custom list-view and i wan to change the colour of pull to refresh bar and text colour on it as you can see in picture it is in black colour. please anyone guide me. ![enter image description here][1]
Asked
Active
Viewed 1,894 times
3
-
You need to change it into the library for your requirement. – GrIsHu Feb 06 '14 at 04:57
-
i have check the library there is no class LoadingLayout.java pull_to_refresh_header_horizontal.xml and pull_to_refresh_header_vertical.xml – Achin Feb 06 '14 at 05:13
-
Your library is different than which i have used. Actually you need to try to change into the layout of your pulltoreferesh library. – GrIsHu Feb 06 '14 at 05:18
-
they have mentioned that we can customize the header from this link https://github.com/chrisbanes/ActionBar-PullToRefresh/blob/development/samples/stock/res/values/styles.xml but did not worked for me – Achin Feb 06 '14 at 05:22
-
the black is not changing as you can see in the pic – Achin Feb 06 '14 at 05:23
-
Try to change into the `colors.xml` – GrIsHu Feb 06 '14 at 05:25
-
there is style.xml in the lib no colors.xml – Achin Feb 06 '14 at 05:34
-
check out into the `values/colors.xml`. – GrIsHu Feb 06 '14 at 05:42
-
i think you are using different library i have attrs.xml , ids.xml, pulltorefreshstrings.xml, style.xml , there is no color.xml – Achin Feb 07 '14 at 04:10
-
https://play.google.com/store/apps/details?id=uk.co.senab.actionbarpulltorefresh.samples.stock I am using this library you can in this video i have used the last one in the Tabs – Achin Feb 07 '14 at 04:14
1 Answers
6
Change Progress Bar Color:
defaultHeaderTransformer.setProgressBarColor(getResources().getColor(R.color.accent_color));
Change Text Color:
<item name="ptrHeaderTitleTextAppearance">@style/TextAppearanceCustomPtrHeaderTitle</item>
<style name="TextAppearanceCustomPtrHeaderTitle" parent="android:TextAppearance.Large">
<item name="android:textSize">20dp</item>
<item name="android:textColor">@android:color/white</item>
</style>

Jatiendar Kumar
- 257
- 2
- 12
-
3hey how to use that defaultHeader class and where to use this statement ? – Cyph3rCod3r Jun 17 '14 at 10:56
-
DefaultHeaderTransformer transformer = (DefaultHeaderTransformer) mPullToRefreshLayout.getHeaderTransformer(); – lordmegamax Aug 13 '15 at 10:07