Skip to content

Commit ac4915a

Browse files
committed
remove unused code
1 parent 893ec6f commit ac4915a

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

WordPressUtils/src/main/java/org/wordpress/android/util/ptr/PullToRefreshHeaderTransformer.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import android.content.Context;
77
import android.view.View;
88
import android.view.ViewGroup;
9-
import android.view.animation.Animation;
10-
import android.widget.TextView;
119

1210
import org.wordpress.android.util.NetworkUtils;
1311
import org.wordpress.android.util.R;
@@ -18,10 +16,8 @@
1816
public class PullToRefreshHeaderTransformer extends DefaultHeaderTransformer {
1917
private View mHeaderView;
2018
private ViewGroup mContentLayout;
21-
private TextView mTextView;
2219
private long mAnimationDuration;
2320
private boolean mShowProgressBarOnly;
24-
private Animation mHeaderOutAnimation;
2521
private OnTopScrollChangedListener mOnTopScrollChangedListener;
2622
private boolean mIsNetworkRefreshMode;
2723
private Context mContext;
@@ -48,7 +44,6 @@ public void onViewCreated(Activity activity, View headerView) {
4844
mContext = activity.getBaseContext();
4945
mHeaderView = headerView;
5046
mContentLayout = (ViewGroup) headerView.findViewById(R.id.ptr_content);
51-
mTextView = (TextView) headerView.findViewById(R.id.ptr_text);
5247
mAnimationDuration = activity.getResources().getInteger(android.R.integer.config_shortAnimTime);
5348
}
5449

@@ -68,10 +63,10 @@ public boolean showHeaderView() {
6863
mContentLayout.setVisibility(View.VISIBLE);
6964
if (changeVis) {
7065
if (isNetworkAvailableOrNotChecked()) {
71-
mTextView.setText(mContext.getText(R.string.pull_to_refresh_pull_label));
66+
setPullText(mContext.getText(R.string.pull_to_refresh_pull_label));
7267
} else {
7368
// Network mode enabled and network not available: show a different PTR label
74-
mTextView.setText(mContext.getText(R.string.pull_to_refresh_pull_no_network_label));
69+
setPullText(mContext.getText(R.string.pull_to_refresh_pull_no_network_label));
7570
}
7671
mHeaderView.setVisibility(View.VISIBLE);
7772
AnimatorSet animSet = new AnimatorSet();
@@ -89,11 +84,6 @@ public boolean showHeaderView() {
8984
return changeVis;
9085
}
9186

92-
@Override
93-
public void onPulled(float percentagePulled) {
94-
super.onPulled(percentagePulled);
95-
}
96-
9787
private void resetContentLayoutAlpha() {
9888
Compat.setAlpha(mContentLayout, 1f);
9989
}

0 commit comments

Comments
 (0)