harbor run -t openthoughts/tasktrove-exp-rpt-crosscodeeval-java-crosscodeeval-java-2027harbor download openthoughts/tasktrove-exp-rpt-crosscodeeval-java-crosscodeeval-java-2027solution file
package com.juziml.read.business.read.view;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import java.lang.ref.WeakReference;
import java.util.LinkedList;
import java.util.List;
/**
* 关闭了抛投效果
* create by zhusw on 2020-03-30 11:51
*/
public class BookRecyclerView extends RecyclerView implements RVInnerItemFunction, RVOuterFunction {
private final BookLayoutManager readLayoutManger;
private boolean allowInterceptTouchEvent = true;
private int currentPosition = 0;
private WeakReference<EventProxy> eventProxyWeakReference;
private AnimParentView animParentView;
private BookView.OnPositionChangedListener onPositionChangedListener;
public BookRecyclerView(Context context) {
this(context, null);
}
public BookRecyclerView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public BookRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
readLayoutManger = new BookLayoutManager(context);
setLayoutManager(readLayoutManger);
readLayoutManger.setOnForceLayoutCompleted(new ItemOnForceLayoutCompleted());
readLayoutManger.setonStopScroller(new ItemOnScrollStop());
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
animParentView = (AnimParentView) getParent();
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
eventProxyWeakReference.clear();
}
protected void bindReadCurlAnimProxy(EventProxy ic) {
if (null != eventProxyWeakReference) {
eventProxyWeakReference.clear();
}
eventProxyWeakReference = new WeakReference<>(ic);
}
protected void setOnPositionChangedListener(BookView.OnPositionChangedListener onPositionChangedListener) {
this.onPositionChangedListener = onPositionChangedListener;
}
@Override
public boolean fling(int velocityX, int velocityY) {
return false;
}
@Override
public void scrollToPosition(int position) {
Complete the code above, taking into account the cross-file context provided. Your solution must work correctly with the related files in the project.
Place your complete solution in /app/solution.py