35 lines
1.3 KiB
Java
35 lines
1.3 KiB
Java
package com.daimajia.swipe.implments;
|
|
|
|
import android.view.View;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import com.daimajia.swipe.SwipeLayout;
|
|
import com.daimajia.swipe.implments.SwipeItemMangerImpl;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class SwipeItemRecyclerMangerImpl extends SwipeItemMangerImpl {
|
|
public SwipeItemRecyclerMangerImpl(RecyclerView.Adapter adapter) {
|
|
super(adapter);
|
|
}
|
|
|
|
public void a(View view, int i) {
|
|
int a = a(i);
|
|
SwipeItemMangerImpl.OnLayoutListener onLayoutListener = new SwipeItemMangerImpl.OnLayoutListener(i);
|
|
SwipeLayout swipeLayout = (SwipeLayout) view.findViewById(a);
|
|
if (swipeLayout == null) {
|
|
throw new IllegalStateException("can not find SwipeLayout in target view");
|
|
}
|
|
if (swipeLayout.getTag(a) != null) {
|
|
SwipeItemMangerImpl.ValueBox valueBox = (SwipeItemMangerImpl.ValueBox) swipeLayout.getTag(a);
|
|
valueBox.b.a(i);
|
|
valueBox.a.a(i);
|
|
valueBox.c = i;
|
|
return;
|
|
}
|
|
SwipeItemMangerImpl.SwipeMemory swipeMemory = new SwipeItemMangerImpl.SwipeMemory(i);
|
|
swipeLayout.a(swipeMemory);
|
|
swipeLayout.a(onLayoutListener);
|
|
swipeLayout.setTag(a, new SwipeItemMangerImpl.ValueBox(this, i, swipeMemory, onLayoutListener));
|
|
this.d.add(swipeLayout);
|
|
}
|
|
}
|