CymChad / CymChad/BaseRecyclerViewAdapterHelper
DraggableModule
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 24.6k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
package com.chad.baserecyclerviewadapterhelper.adapter;
import androidx.annotation.NonNull;
import com.chad.baserecyclerviewadapterhelper.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.BaseDraggableModule;
import com.chad.library.adapter.base.module.DraggableModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public class DragAndSwipeAdapter extends BaseQuickAdapter<String, BaseViewHolder> implements DraggableModule {
public DragAndSwipeAdapter(List<String> data) {
super(R.layout.item_draggable_view, data);
}
@Override
protected void convert(@NotNull BaseViewHolder helper, @NotNull String item) {
switch (helper.getLayoutPosition() % 3) {
case 0:
helper.setImageResource(R.id.iv_head, R.mipmap.head_img0);
break;
case 1:
helper.setImageResource(R.id.iv_head, R.mipmap.head_img1);
break;
case 2:
helper.setImageResource(R.id.iv_head, R.mipmap.head_img2);
break;
default:
break;
}
helper.setText(R.id.tv, item);
}
@NonNull
@Override
public BaseDraggableModule addDraggableModule(@NonNull BaseQuickAdapter<?, ?> baseQuickAdapter) {
return DraggableModule.super.addDraggableModule(baseQuickAdapter);
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The body shows DragAndSwipeAdapter and its addDraggableModule override, but names no file, test, or requested change. Start by locating DragAndSwipeAdapter and the DraggableModule/BaseDraggableModule definitions; done cannot be determined until the desired outcome is specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100