Skip to content

Commit

Permalink
perf: 删除无用的代码
Browse files Browse the repository at this point in the history
  • Loading branch information
limuyang2 committed Jul 24, 2022
1 parent 2a47266 commit 2a10b1a
Show file tree
Hide file tree
Showing 20 changed files with 2 additions and 621 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
package com.chad.baserecyclerviewadapterhelper.data;


import com.chad.baserecyclerviewadapterhelper.entity.DelegateMultiEntity;
import com.chad.baserecyclerviewadapterhelper.entity.DiffUtilDemoEntity;
import com.chad.baserecyclerviewadapterhelper.entity.MySection;
import com.chad.baserecyclerviewadapterhelper.entity.ProviderMultiEntity;
import com.chad.baserecyclerviewadapterhelper.entity.QuickMultipleEntity;
import com.chad.baserecyclerviewadapterhelper.entity.Status;
import com.chad.baserecyclerviewadapterhelper.entity.Video;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -52,70 +47,7 @@ public static List<Status> addData(List list, int dataSize) {
return list;
}

// public static List<MySection> getSampleData() {
// List<MySection> list = new ArrayList<>();
// list.add(new MySection(true, "Section 1", true));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(true, "Section 2", false));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(true, "Section 3", false));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(true, "Section 4", false));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(true, "Section 5", false));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// list.add(new MySection(new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
// return list;
// }

// public static List<SectionMultipleItem> getSectionMultiData() {
// List<SectionMultipleItem> list = new ArrayList<>();
// Video video = new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD);
//
// // add section data
// list.add(new SectionMultipleItem(true, "Section 1", true));
// // add multiple type item data ---start---
// list.add(new SectionMultipleItem(SectionMultipleItem.TEXT, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, "video_id_0")));
// list.add(new SectionMultipleItem(SectionMultipleItem.TEXT, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, "video_id_1")));
// list.add(new SectionMultipleItem(SectionMultipleItem.IMG_TEXT, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, "video_id_2")));
// // ---end---
//
// list.add(new SectionMultipleItem(true, "Section 2", false));
// list.add(new SectionMultipleItem(SectionMultipleItem.IMG_TEXT, video));
// list.add(new SectionMultipleItem(SectionMultipleItem.IMG_TEXT, video));
// list.add(new SectionMultipleItem(SectionMultipleItem.TEXT, video));
// list.add(new SectionMultipleItem(SectionMultipleItem.TEXT, video));
// list.add(new SectionMultipleItem(true, "Section 3", false));
// list.add(new SectionMultipleItem(SectionMultipleItem.IMG_TEXT, video));
// list.add(new SectionMultipleItem(true, "Section 4", false));
// list.add(new SectionMultipleItem(SectionMultipleItem.TEXT, video));
// list.add(new SectionMultipleItem(true, "Section 5", false));
// list.add(new SectionMultipleItem(SectionMultipleItem.IMG_TEXT, video));
// list.add(new SectionMultipleItem(SectionMultipleItem.IMG_TEXT, video));
// list.add(new SectionMultipleItem(SectionMultipleItem.IMG_TEXT, video));
// return list;
// }

public static List<MySection> getSectionData() {
List<MySection> list = new ArrayList<>();
for (int i = 0; i < 8; i++) {
list.add(new MySection(true, "Section " + i));
list.add(new MySection(false, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
list.add(new MySection(false, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
list.add(new MySection(false, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
list.add(new MySection(false, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
list.add(new MySection(false, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
list.add(new MySection(false, new Video(HTTPS_AVATARS1_GITHUBUSERCONTENT_COM_LINK, CYM_CHAD)));
}
return list;
}

public static List<String> getStrData() {
List<String> list = new ArrayList<>();
Expand All @@ -129,48 +61,7 @@ public static List<String> getStrData() {
return list;
}

public static List<QuickMultipleEntity> getMultipleItemData() {
List<QuickMultipleEntity> list = new ArrayList<>();
for (int i = 0; i <= 4; i++) {
list.add(new QuickMultipleEntity(QuickMultipleEntity.IMG, QuickMultipleEntity.IMG_SPAN_SIZE));
list.add(new QuickMultipleEntity(QuickMultipleEntity.TEXT, QuickMultipleEntity.TEXT_SPAN_SIZE, CYM_CHAD));
list.add(new QuickMultipleEntity(QuickMultipleEntity.IMG_TEXT, QuickMultipleEntity.IMG_TEXT_SPAN_SIZE));
list.add(new QuickMultipleEntity(QuickMultipleEntity.IMG_TEXT, QuickMultipleEntity.IMG_TEXT_SPAN_SIZE_MIN));
list.add(new QuickMultipleEntity(QuickMultipleEntity.IMG_TEXT, QuickMultipleEntity.IMG_TEXT_SPAN_SIZE_MIN));
}

return list;
}

public static List<DelegateMultiEntity> getDelegateMultiItemData() {
List<DelegateMultiEntity> list = new ArrayList<>();
for (int i = 0; i <= 40; i++) {
list.add(new DelegateMultiEntity());
}
return list;
}

public static List<ProviderMultiEntity> getProviderMultiItemData() {
List<ProviderMultiEntity> list = new ArrayList<>();
for (int i = 0; i <= 40; i++) {
list.add(new ProviderMultiEntity());
}
return list;
}

//
// public static List<NormalMultipleEntity> getNormalMultipleEntities() {
// List<NormalMultipleEntity> list = new ArrayList<>();
// for (int i = 0; i <= 4; i++) {
// list.add(new NormalMultipleEntity(NormalMultipleEntity.SINGLE_IMG));
// list.add(new NormalMultipleEntity(NormalMultipleEntity.SINGLE_TEXT,CHAY_CHAN));
// list.add(new NormalMultipleEntity(NormalMultipleEntity.TEXT_IMG,CHAY_CHAN));
// list.add(new NormalMultipleEntity(NormalMultipleEntity.TEXT_IMG,CYM_CHAD));
// list.add(new NormalMultipleEntity(NormalMultipleEntity.TEXT_IMG,CHAY_CHAN));
// }
// return list;
// }
//
public static List<DiffUtilDemoEntity> getDiffUtilDemoEntities() {
List<DiffUtilDemoEntity> list = new ArrayList<>();
for (int i = 0; i < 10; i++){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
*/
package com.chad.baserecyclerviewadapterhelper.entity;

import com.chad.library.adapter.base.entity.MultiItemEntity;

/**
* 文 件 名: ClickEntity
* 创 建 人: Allen
Expand All @@ -24,7 +22,7 @@
* 修改时间:
* 修改备注:
*/
public class ClickEntity implements MultiItemEntity {
public class ClickEntity {
public static final int CLICK_ITEM_VIEW = 1;
public static final int CLICK_ITEM_CHILD_VIEW = 2;
public static final int LONG_CLICK_ITEM_VIEW = 3;
Expand All @@ -35,7 +33,6 @@ public ClickEntity(final int type) {
this.type = type;
}

@Override
public int getItemType() {
return type;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.chad.baserecyclerviewadapterhelper.entity

import com.chad.library.adapter.base.entity.SectionEntity

/**
* @author: limuyang
* @date: 2019-12-06
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2a10b1a

Please sign in to comment.