Projects >> Android-PullToRefresh >>c56a1c0c2347506f642b8b54f5957235db42f957

Chunk
Conflicting content
		}

		if (getScrollY() != y) {
<<<<<<< HEAD
			mCurrentSmoothScrollRunnable = new SmoothScrollRunnable(getScrollY(), y, duration);
=======
			mCurrentSmoothScrollRunnable = new SmoothScrollRunnable(getScrollY(), y, getAnimationDuration());
>>>>>>> 0bd2812decbe8b714b362d2edbd1fac2a10d5cce
			post(mCurrentSmoothScrollRunnable);
		}
	}
Solution content
		}

		if (getScrollY() != y) {
			mCurrentSmoothScrollRunnable = new SmoothScrollRunnable(getScrollY(), y, duration);
			post(mCurrentSmoothScrollRunnable);
		}
	}
File
PullToRefreshBase.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
		private final Interpolator mInterpolator;
		private final int mScrollToY;
		private final int mScrollFromY;
<<<<<<< HEAD
		private final long mDuration;
=======
		private final int mAnimationDuration;
>>>>>>> 0bd2812decbe8b714b362d2edbd1fac2a10d5cce

		private boolean mContinueRunning = true;
		private long mStartTime = -1;
Solution content
		private final Interpolator mInterpolator;
		private final int mScrollToY;
		private final int mScrollFromY;
		private final long mDuration;

		private boolean mContinueRunning = true;
		private long mStartTime = -1;
File
PullToRefreshBase.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
		private long mStartTime = -1;
		private int mCurrentY = -1;

<<<<<<< HEAD
		public SmoothScrollRunnable(int fromY, int toY, long duration) {
			mScrollFromY = fromY;
			mScrollToY = toY;
			mInterpolator = new DecelerateInterpolator();
			mDuration = duration;
=======
		public SmoothScrollRunnable(int fromY, int toY, int animationDuration) {
			mScrollFromY = fromY;
			mScrollToY = toY;
			mAnimationDuration = animationDuration;
			mInterpolator = getInterpolator();
>>>>>>> 0bd2812decbe8b714b362d2edbd1fac2a10d5cce
		}

		@Override
Solution content
		private long mStartTime = -1;
		private int mCurrentY = -1;

		public SmoothScrollRunnable(int fromY, int toY, long duration) {
			mScrollFromY = fromY;
			mScrollToY = toY;
			mInterpolator = getInterpolator();
			mDuration = duration;
		}

		@Override
File
PullToRefreshBase.java
Developer's decision
Combination
Kind of conflict
Attribute
Method invocation
Method signature
Variable
Chunk
Conflicting content
				 * calculations. We use 1000 as it gives us good accuracy and
				 * small rounding errors
				 */
<<<<<<< HEAD
				long normalizedTime = (1000 * (System.currentTimeMillis() - mStartTime)) / mDuration;
=======
				long normalizedTime = (1000 * (System.currentTimeMillis() - mStartTime)) / mAnimationDuration;
>>>>>>> 0bd2812decbe8b714b362d2edbd1fac2a10d5cce
				normalizedTime = Math.max(Math.min(normalizedTime, 1000), 0);

				final int deltaY = Math.round((mScrollFromY - mScrollToY)
Solution content
				 * calculations. We use 1000 as it gives us good accuracy and
				 * small rounding errors
				 */
				long normalizedTime = (1000 * (System.currentTimeMillis() - mStartTime)) / mDuration;
				normalizedTime = Math.max(Math.min(normalizedTime, 1000), 0);

				final int deltaY = Math.round((mScrollFromY - mScrollToY)
File
PullToRefreshBase.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Variable
Chunk
Conflicting content
	@Override
	protected final ListView createRefreshableView(Context context, AttributeSet attrs) {
<<<<<<< HEAD
		final ListView lv;
		if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
			lv = new InternalListViewSDK9(context, attrs);
		} else {
			lv = new InternalListView(context, attrs);
		}
=======
		ListView lv = createInternalListView(context, attrs);
>>>>>>> 0bd2812decbe8b714b362d2edbd1fac2a10d5cce

		// Get Styles from attrs
		TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PullToRefresh);
Solution content
		if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
			lv = new InternalListViewSDK9(context, attrs);
		} else {
			lv = new InternalListView(context, attrs);
		}
		return lv;
    }

	@Override
	protected final ListView createRefreshableView(Context context, AttributeSet attrs) {
		ListView lv = createListView(context, attrs);

		// Get Styles from attrs
		TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PullToRefresh);
File
PullToRefreshListView.java
Developer's decision
Manual
Kind of conflict
If statement
Method invocation
Variable