-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
1,003 additions
and
28 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.damon.adapter; | ||
|
||
import android.support.annotation.Nullable; | ||
|
||
import com.chad.library.adapter.base.BaseQuickAdapter; | ||
import com.chad.library.adapter.base.BaseViewHolder; | ||
import com.damon.R; | ||
import com.damon.core.bean.ArticleData; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author: DamonJiang | ||
* @date: 2018/10/9 0009 | ||
* @description: | ||
*/ | ||
public class HomePageAdapter extends BaseQuickAdapter<ArticleData,BaseViewHolder> { | ||
|
||
public HomePageAdapter(@Nullable List<ArticleData> data) { | ||
super(R.layout.item_article, data); | ||
} | ||
|
||
@Override | ||
protected void convert(BaseViewHolder helper, ArticleData item) { | ||
helper.setText(R.id.id_tv_author,item.getAuthor()) | ||
.setText(R.id.id_tv_flag,item.getChapterName()) | ||
.setText(R.id.id_tv_title,item.getTitle()) | ||
.setText(R.id.id_tv_time, item.getNiceDate()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
package com.damon.core.bean; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* @author: DamonJiang | ||
* @date: 2018/10/9 0009 | ||
* @description: | ||
*/ | ||
public class ArticleData implements Serializable{ | ||
private String apkLink; | ||
private String author; | ||
private int chapterId; | ||
private String chapterName; | ||
private boolean collect; | ||
private int courseId; | ||
private String desc; | ||
private String envelopePic; | ||
private int id; | ||
private String link; | ||
private String niceDate; | ||
private String origin; | ||
private String projectLink; | ||
private int superChapterId; | ||
private String superChapterName; | ||
private long publishTime; | ||
private String title; | ||
private int visible; | ||
private int zan; | ||
|
||
public String getApkLink() { | ||
return apkLink; | ||
} | ||
|
||
public void setApkLink(String apkLink) { | ||
this.apkLink = apkLink; | ||
} | ||
|
||
public String getAuthor() { | ||
return author; | ||
} | ||
|
||
public void setAuthor(String author) { | ||
this.author = author; | ||
} | ||
|
||
public int getChapterId() { | ||
return chapterId; | ||
} | ||
|
||
public void setChapterId(int chapterId) { | ||
this.chapterId = chapterId; | ||
} | ||
|
||
public String getChapterName() { | ||
return chapterName; | ||
} | ||
|
||
public void setChapterName(String chapterName) { | ||
this.chapterName = chapterName; | ||
} | ||
|
||
public boolean isCollect() { | ||
return collect; | ||
} | ||
|
||
public void setCollect(boolean collect) { | ||
this.collect = collect; | ||
} | ||
|
||
public int getCourseId() { | ||
return courseId; | ||
} | ||
|
||
public void setCourseId(int courseId) { | ||
this.courseId = courseId; | ||
} | ||
|
||
public String getDesc() { | ||
return desc; | ||
} | ||
|
||
public void setDesc(String desc) { | ||
this.desc = desc; | ||
} | ||
|
||
public String getEnvelopePic() { | ||
return envelopePic; | ||
} | ||
|
||
public void setEnvelopePic(String envelopePic) { | ||
this.envelopePic = envelopePic; | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
|
||
public void setId(int id) { | ||
this.id = id; | ||
} | ||
|
||
public String getLink() { | ||
return link; | ||
} | ||
|
||
public void setLink(String link) { | ||
this.link = link; | ||
} | ||
|
||
public String getNiceDate() { | ||
return niceDate; | ||
} | ||
|
||
public void setNiceDate(String niceDate) { | ||
this.niceDate = niceDate; | ||
} | ||
|
||
public String getOrigin() { | ||
return origin; | ||
} | ||
|
||
public void setOrigin(String origin) { | ||
this.origin = origin; | ||
} | ||
|
||
public String getProjectLink() { | ||
return projectLink; | ||
} | ||
|
||
public void setProjectLink(String projectLink) { | ||
this.projectLink = projectLink; | ||
} | ||
|
||
public int getSuperChapterId() { | ||
return superChapterId; | ||
} | ||
|
||
public void setSuperChapterId(int superChapterId) { | ||
this.superChapterId = superChapterId; | ||
} | ||
|
||
public String getSuperChapterName() { | ||
return superChapterName; | ||
} | ||
|
||
public void setSuperChapterName(String superChapterName) { | ||
this.superChapterName = superChapterName; | ||
} | ||
|
||
public long getPublishTime() { | ||
return publishTime; | ||
} | ||
|
||
public void setPublishTime(long publishTime) { | ||
this.publishTime = publishTime; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public int getVisible() { | ||
return visible; | ||
} | ||
|
||
public void setVisible(int visible) { | ||
this.visible = visible; | ||
} | ||
|
||
public int getZan() { | ||
return zan; | ||
} | ||
|
||
public void setZan(int zan) { | ||
this.zan = zan; | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
app/src/main/java/com/damon/core/bean/ArticleListData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package com.damon.core.bean; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author: DamonJiang | ||
* @date: 2018/10/9 0009 | ||
* @description: | ||
*/ | ||
public class ArticleListData { | ||
private int curPage; | ||
private List<ArticleData> datas; | ||
private int offset; | ||
private boolean over; | ||
private int pageCount; | ||
private int size; | ||
private int total; | ||
|
||
public int getCurPage() { | ||
return curPage; | ||
} | ||
|
||
public void setCurPage(int curPage) { | ||
this.curPage = curPage; | ||
} | ||
|
||
public List<ArticleData> getDatas() { | ||
return datas; | ||
} | ||
|
||
public void setDatas(List<ArticleData> datas) { | ||
this.datas = datas; | ||
} | ||
|
||
public int getOffset() { | ||
return offset; | ||
} | ||
|
||
public void setOffset(int offset) { | ||
this.offset = offset; | ||
} | ||
|
||
public boolean isOver() { | ||
return over; | ||
} | ||
|
||
public void setOver(boolean over) { | ||
this.over = over; | ||
} | ||
|
||
public int getPageCount() { | ||
return pageCount; | ||
} | ||
|
||
public void setPageCount(int pageCount) { | ||
this.pageCount = pageCount; | ||
} | ||
|
||
public int getSize() { | ||
return size; | ||
} | ||
|
||
public void setSize(int size) { | ||
this.size = size; | ||
} | ||
|
||
public int getTotal() { | ||
return total; | ||
} | ||
|
||
public void setTotal(int total) { | ||
this.total = total; | ||
} | ||
} |
Oops, something went wrong.