3

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]

Achin
  • 1,252
  • 4
  • 28
  • 63
  • 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 Answers1

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