johannilsson / android-pulltorefresh

DEPRECATED This project aims to provide a reusable pull to refresh widget for Android.
2.47k stars 1.03k forks source link

how to change pullToRefresh Sub header Text Color #65

Open sahir opened 11 years ago

sahir commented 11 years ago

Hello Using this way i am change string text of pull to refersh

PullToRefreshScrollView mPullRefreshScrollView;

mPullRefreshScrollView = (PullToRefreshScrollView)findViewById(R.id.pull_refresh_scrollview);

vRefresh = mPullRefreshScrollView.getLoadingLayoutProxy();

vRefresh.setPullLabel(getResources().getString(R.string.pull_to_refresh_pull_label_text)); vRefresh.setRefreshingLabel(getResources().getString(R.string.pull_to_refresh_refreshing_label_text)); vRefresh.setReleaseLabel(getResources().getString(R.string.pull_to_refresh_release_label_text));

but when i try to change text color using this

View rView,rView1;

rView = mPullRefreshScrollView.getRefreshableView();

rView1 = mPullRefreshScrollView.getRefreshableView();

TextView tViewMainText = (TextView)rView.findViewById(R.id.pull_to_refresh_text); tViewMainText.setTextColor(Color.BLACK);

TextView tViewSubText = (TextView)rView1.findViewById(R.id.pull_to_refresh_sub_text); tViewSubText.setTextColor(Color.BLACK);

only change color of pull_to_refresh_text but not change color of (sub text)pull_to_refresh_sub_text how to change color of sub text.

Thanks sahir saiyed

6epreu commented 10 years ago

Hey, have you solved your problem?

6epreu commented 10 years ago

You need to add method to interface ILoadingLayout like setHeaderColor(int color) and then implement it in the abstract class LoadingLayout.java. F.e. public void setHeaderTextColor( int color ){ if (mHeaderText != null ) { mHeaderText.setTextColor(color); } }