转换部分java代码

old
zlj 5 years ago
parent 8cff9f700a
commit 13e9fa78b3
  1. 4
      app/src/main/java/com/novel/read/activity/NovelBookDetailActivity.kt
  2. 18
      app/src/main/java/com/novel/read/activity/NovelBookTypeListActivity.kt
  3. 18
      app/src/main/java/com/novel/read/activity/NovelRankListActivity.kt
  4. 24
      app/src/main/java/com/novel/read/activity/NovelReadActivity.kt
  5. 44
      app/src/main/java/com/novel/read/activity/NovelSearchActivity.kt
  6. 2
      app/src/main/java/com/novel/read/adapter/EditRecommendAdapter.java
  7. 2
      app/src/main/java/com/novel/read/adapter/HistoryAdapter.java
  8. 14
      app/src/main/java/com/novel/read/fragment/BookFragment.kt
  9. 18
      app/src/main/java/com/novel/read/fragment/BookListFragment.kt
  10. 12
      app/src/main/java/com/novel/read/fragment/ManFragment.kt
  11. 11
      app/src/main/java/com/novel/read/fragment/StackFragment.kt
  12. 12
      app/src/main/java/com/novel/read/fragment/WomanFragment.kt
  13. 2
      app/src/main/java/com/novel/read/model/protocol/BookDetailResp.java
  14. 2
      app/src/main/java/com/novel/read/model/protocol/RankByUpdateResp.java
  15. 112
      app/src/main/java/com/novel/read/model/protocol/RecommendBookResp.java
  16. 43
      app/src/main/java/com/novel/read/model/protocol/RecommendBookResp.kt
  17. 167
      app/src/main/java/com/novel/read/model/protocol/RecommendListResp.java
  18. 67
      app/src/main/java/com/novel/read/model/protocol/RecommendListResp.kt
  19. 135
      app/src/main/java/com/novel/read/model/protocol/SearchResp.java
  20. 46
      app/src/main/java/com/novel/read/model/protocol/SearchResp.kt
  21. 138
      app/src/main/java/com/novel/read/model/protocol/VersionResp.java
  22. 42
      app/src/main/java/com/novel/read/model/protocol/VersionResp.kt
  23. 4
      app/src/main/java/com/novel/read/widget/dialog/ReadSettingDialog.kt
  24. 6
      app/src/main/java/com/novel/read/widget/page/anim/SimulationPageAnim.kt

@ -30,7 +30,7 @@ import java.util.*
class NovelBookDetailActivity : NovelBaseActivity(), View.OnClickListener {
private var mAdapter: LoveLyAdapter? = null
private lateinit var mAdapter: LoveLyAdapter
private val mList = ArrayList<RecommendBookResp.BookBean>()
private var mBookId: Int = 0
@ -134,7 +134,7 @@ class NovelBookDetailActivity : NovelBaseActivity(), View.OnClickListener {
} else {
mList.clear()
mList.addAll(event.result!!.book)
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
}
}

@ -18,7 +18,7 @@ import java.util.*
class NovelBookTypeListActivity : NovelBaseActivity() {
private var mList: MutableList<SearchResp.BookBean> = ArrayList()
private var mAdapter: BookListAdapter? = null
private lateinit var mAdapter: BookListAdapter
private var mCategoryId: String? = null
private var mTitle: String? = null
private var page = 1
@ -36,15 +36,15 @@ class NovelBookTypeListActivity : NovelBaseActivity() {
mAdapter = BookListAdapter(mList, rlv_type_list)
rlv_type_list.adapter = mAdapter
mAdapter!!.setOnLoadMoreListener(object : OnLoadMoreListener {
mAdapter.setOnLoadMoreListener(object : OnLoadMoreListener {
override fun onLoadMore() {
if (mAdapter!!.isLoadingMore) {
if (mAdapter.isLoadingMore) {
} else {
if (loadSize >= COMMENT_SIZE) {
mAdapter!!.isLoadingMore = true
mAdapter.isLoadingMore = true
mList.add(SearchResp.BookBean())
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
page++
getData()
}
@ -73,15 +73,15 @@ class NovelBookTypeListActivity : NovelBaseActivity() {
refresh.showError()
} else {
loadSize = event.result!!.book.size
if (mAdapter!!.isLoadingMore) {
if (mAdapter.isLoadingMore) {
mList.removeAt(mList.size - 1)
mList.addAll(event.result!!.book)
mAdapter!!.notifyDataSetChanged()
mAdapter!!.isLoadingMore = false
mAdapter.notifyDataSetChanged()
mAdapter.isLoadingMore = false
} else {
mList.clear()
mList.addAll(event.result!!.book)
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
}
}
}

@ -20,7 +20,7 @@ import java.util.*
*/
class NovelRankListActivity : NovelBaseActivity() {
private var mAdapter: RankListAdapter? = null
private lateinit var mAdapter: RankListAdapter
private var mList: MutableList<RankByUpdateResp.BookBean> = ArrayList()
private var page = 1
private var loadSize: Int = 0
@ -46,15 +46,15 @@ class NovelRankListActivity : NovelBaseActivity() {
override fun initData() {
toolbar.setNavigationOnClickListener { finish() }
mAdapter!!.setOnLoadMoreListener(object : OnLoadMoreListener {
mAdapter.setOnLoadMoreListener(object : OnLoadMoreListener {
override fun onLoadMore() {
if (mAdapter!!.isLoadingMore) {
if (mAdapter.isLoadingMore) {
} else {
if (loadSize >= COMMENT_SIZE) {
mAdapter!!.isLoadingMore = true
mAdapter.isLoadingMore = true
mList.add(RankByUpdateResp.BookBean())
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
page++
getData()
}
@ -73,15 +73,15 @@ class NovelRankListActivity : NovelBaseActivity() {
if (response.isSuccessful) {
if (response.body() != null) {
loadSize = response.body()!!.book.size
if (mAdapter!!.isLoadingMore) {
if (mAdapter.isLoadingMore) {
mList.removeAt(mList.size - 1)
mList.addAll(response.body()!!.book)
mAdapter!!.notifyDataSetChanged()
mAdapter!!.isLoadingMore = false
mAdapter.notifyDataSetChanged()
mAdapter.isLoadingMore = false
} else {
mList.clear()
mList.addAll(response.body()!!.book)
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
}
}

@ -61,11 +61,11 @@ import java.util.*
*/
class NovelReadActivity : NovelBaseActivity(), DownloadService.OnDownloadListener {
private var mCategoryAdapter: CategoryAdapter? = null
private lateinit var mCategoryAdapter: CategoryAdapter
private val mChapters = ArrayList<TxtChapter>()
private var mCurrentChapter: TxtChapter? = null //当前章节
private var currentChapter = 0
private var mMarkAdapter: MarkAdapter? = null
private lateinit var mMarkAdapter: MarkAdapter
private val mMarks = ArrayList<BookSignTable>()
private lateinit var mPageLoader: PageLoader
private var mTopInAnim: Animation? = null
@ -194,7 +194,7 @@ class NovelReadActivity : NovelBaseActivity(), DownloadService.OnDownloadListene
object : PageLoader.OnPageChangeListener {
override fun onChapterChange(pos: Int) {
mCategoryAdapter!!.setChapter(pos)
mCategoryAdapter.setChapter(pos)
mCurrentChapter = mChapters[pos]
currentChapter = pos
}
@ -207,7 +207,7 @@ class NovelReadActivity : NovelBaseActivity(), DownloadService.OnDownloadListene
override fun onCategoryFinish(chapters: List<TxtChapter>) {
mChapters.clear()
mChapters.addAll(chapters)
mCategoryAdapter!!.refreshItems(mChapters)
mCategoryAdapter.refreshItems(mChapters)
}
override fun onPageCountChange(count: Int) {}
@ -234,7 +234,7 @@ class NovelReadActivity : NovelBaseActivity(), DownloadService.OnDownloadListene
})
read_tv_category.setOnClickListener {
//移动到指定位置
if (mCategoryAdapter!!.count > 0) {
if (mCategoryAdapter.count > 0) {
rlv_list.setSelection(mPageLoader.chapterPos)
}
//切换菜单
@ -303,7 +303,7 @@ class NovelReadActivity : NovelBaseActivity(), DownloadService.OnDownloadListene
tvAddMark.setOnClickListener {
if (mCurrentChapter != null) {
mMarkAdapter!!.edit = false
mMarkAdapter.edit = false
if (BookRepository.getInstance().getSignById(mCurrentChapter!!.chapterId)) {
showToast(getString(R.string.sign_exist))
return@setOnClickListener
@ -315,15 +315,15 @@ class NovelReadActivity : NovelBaseActivity(), DownloadService.OnDownloadListene
}
tvClear.setOnClickListener {
if (mMarkAdapter!!.edit) {
val sign = mMarkAdapter!!.selectList
if (mMarkAdapter.edit) {
val sign = mMarkAdapter.selectList
if (sign != "") {
BookRepository.getInstance().deleteSign(sign)
updateMark()
}
mMarkAdapter!!.edit = false
mMarkAdapter.edit = false
} else {
mMarkAdapter!!.edit = true
mMarkAdapter.edit = true
}
}
@ -511,7 +511,7 @@ class NovelReadActivity : NovelBaseActivity(), DownloadService.OnDownloadListene
mHandler.sendEmptyMessage(WHAT_CHAPTER)
}
// 当完成章节的时候,刷新列表
mCategoryAdapter!!.notifyDataSetChanged()
mCategoryAdapter.notifyDataSetChanged()
}
@Subscribe
@ -524,7 +524,7 @@ class NovelReadActivity : NovelBaseActivity(), DownloadService.OnDownloadListene
private fun updateMark() {
mMarks.clear()
mMarks.addAll(BookRepository.getInstance().getSign(mBookId))
mMarkAdapter!!.notifyDataSetChanged()
mMarkAdapter.notifyDataSetChanged()
}
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {

@ -35,13 +35,13 @@ import java.util.*
class NovelSearchActivity : NovelBaseActivity() {
private val mHotList = ArrayList<String>()
private var mHotAdapter: HotAdapter? = null
private lateinit var mHotAdapter: HotAdapter
private var mHisList: MutableList<SearchListTable> = ArrayList()
private var mHisAdapter: HistoryAdapter? = null
private lateinit var mHisAdapter: HistoryAdapter
private val mSearchList = ArrayList<SearchResp.BookBean>()
private var mSearchAdapter: SearchAdapter? = null
private lateinit var mSearchAdapter: SearchAdapter
private var page = 1
private var loadSize: Int = 0
@ -76,15 +76,15 @@ class NovelSearchActivity : NovelBaseActivity() {
mSearchAdapter = SearchAdapter(mSearchList, rlv_search)
rlv_search.adapter = mSearchAdapter
mSearchAdapter!!.setOnLoadMoreListener(object : OnLoadMoreListener {
mSearchAdapter.setOnLoadMoreListener(object : OnLoadMoreListener {
override fun onLoadMore() {
if (mSearchAdapter!!.isLoadingMore) {
if (mSearchAdapter.isLoadingMore) {
} else {
if (loadSize >= COMMENT_SIZE) {
mSearchAdapter!!.isLoadingMore = true
mSearchAdapter.isLoadingMore = true
mSearchList.add(SearchResp.BookBean())
mSearchAdapter!!.notifyDataSetChanged()
mSearchAdapter.notifyDataSetChanged()
page++
getData()
}
@ -143,29 +143,29 @@ class NovelSearchActivity : NovelBaseActivity() {
tv_search.setOnKeyListener { v, keyCode, event ->
//修改回车键功能
if (keyCode == KeyEvent.KEYCODE_ENTER) {
mSearchAdapter!!.setHolderType(true)
mSearchAdapter.setHolderType(true)
saveKey()
return@setOnKeyListener true
}
false
}
mHotAdapter!!.setOnItemClickListener { view, pos ->
mSearchAdapter!!.setHolderType(true)
mHotAdapter.setOnItemClickListener { view, pos ->
mSearchAdapter.setHolderType(true)
refresh.visibility = View.VISIBLE
tv_search.setText(mHotList[pos])
saveKey()
}
mHisAdapter!!.setOnItemClickListener { view, pos ->
mSearchAdapter!!.setHolderType(true)
mHisAdapter.setOnItemClickListener { view, pos ->
mSearchAdapter.setHolderType(true)
refresh.visibility = View.VISIBLE
tv_search.setText(mHisList[pos].key)
saveKey()
}
mSearchAdapter!!.setOnItemClickListener { view, pos ->
mSearchAdapter!!.setHolderType(true)
mSearchAdapter.setOnItemClickListener { view, pos ->
mSearchAdapter.setHolderType(true)
tv_search.setText(mSearchList[pos].title)
saveKey()
}
@ -178,7 +178,7 @@ class NovelSearchActivity : NovelBaseActivity() {
LitePal.deleteAll(SearchListTable::class.java)
mHisList.clear()
mHisList.addAll(LitePal.order("saveTime desc").limit(5).find(SearchListTable::class.java))
mHisAdapter!!.notifyDataSetChanged()
mHisAdapter.notifyDataSetChanged()
})
}
@ -200,13 +200,13 @@ class NovelSearchActivity : NovelBaseActivity() {
searchListTable.saveOrUpdate("key=?", tv_search.text.toString().trim { it <= ' ' })
mHisList.clear()
mHisList.addAll(LitePal.order("saveTime desc").limit(5).find(SearchListTable::class.java))
mHisAdapter!!.notifyDataSetChanged()
mHisAdapter.notifyDataSetChanged()
}
override fun onBackPressed() {
if (refresh.visibility == View.VISIBLE) {
tv_search.setText("")
mSearchAdapter!!.setHolderType(false)
mSearchAdapter.setHolderType(false)
page = 1
} else {
super.onBackPressed()
@ -221,7 +221,7 @@ class NovelSearchActivity : NovelBaseActivity() {
} else {
mHotList.clear()
mHotList.addAll(event.result!!.key)
mHotAdapter!!.notifyDataSetChanged()
mHotAdapter.notifyDataSetChanged()
}
}
@ -232,15 +232,15 @@ class NovelSearchActivity : NovelBaseActivity() {
refresh.showError()
} else {
loadSize = event.result!!.book.size
if (mSearchAdapter!!.isLoadingMore) {
if (mSearchAdapter.isLoadingMore) {
mSearchList.removeAt(mSearchList.size - 1)
mSearchList.addAll(event.result!!.book)
mSearchAdapter!!.notifyDataSetChanged()
mSearchAdapter!!.isLoadingMore = false
mSearchAdapter.notifyDataSetChanged()
mSearchAdapter.isLoadingMore = false
} else {
mSearchList.clear()
mSearchList.addAll(event.result!!.book)
mSearchAdapter!!.notifyDataSetChanged()
mSearchAdapter.notifyDataSetChanged()
}
}
}

@ -20,7 +20,7 @@ import com.novel.read.utlis.GlideImageLoader;
import java.util.List;
/**
* create by 赵利君 on 2019/6/19
* create by zlj on 2019/6/19
* describe:
*/
public class EditRecommendAdapter extends RecyclerView.Adapter<EditRecommendAdapter.ViewHolder> {

@ -15,7 +15,7 @@ import com.novel.read.model.db.SearchListTable;
import java.util.List;
/**
* create by 赵利君 on 2019/6/17
* create by zlj on 2019/6/17
* describe:
*/
public class HistoryAdapter extends RecyclerView.Adapter<HistoryAdapter.ViewHolder> {

@ -39,7 +39,7 @@ import java.util.*
*/
class BookFragment : NovelBaseFragment() {
private var mAdapter: BookAdapter? = null
private lateinit var mAdapter: BookAdapter
private val mList = ArrayList<CollBookBean>()
private var isInit = true
@ -90,7 +90,7 @@ class BookFragment : NovelBaseFragment() {
R.id.edit_book -> if (mList.size == 0) { //没书的时候提醒用户不能编辑
activity!!.showToast(getString(R.string.please_add_book))
} else {
mAdapter!!.setEdit(true)
mAdapter.setEdit(true)
tv_cancel.visibility = View.VISIBLE
tv_delete.visibility = View.VISIBLE
title_edit.visibility = View.VISIBLE
@ -117,7 +117,7 @@ class BookFragment : NovelBaseFragment() {
for (i in mList.indices) {
mList[i].isSelect = true
}
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
}
true
}
@ -127,7 +127,7 @@ class BookFragment : NovelBaseFragment() {
}
tv_delete.setOnClickListener { view ->
val deleteList = mAdapter!!.selectList
val deleteList = mAdapter.selectList
for (i in deleteList.indices) {
if (deleteList[i].isSaved) {
val count = deleteList[i].delete()
@ -140,7 +140,7 @@ class BookFragment : NovelBaseFragment() {
updateBook(UpdateBookEvent())
}
mAdapter!!.setOnItemClickListener { view, pos ->
mAdapter.setOnItemClickListener { view, pos ->
EventManager.instance.postEvent(
SwitchFragmentEvent()
)
@ -203,7 +203,7 @@ class BookFragment : NovelBaseFragment() {
title_edit.visibility = View.GONE
mList.clear()
mList.addAll(BookRepository.getInstance().collBooks)
mAdapter!!.setEdit(false)
mAdapter.setEdit(false)
}
private fun update(collBookBeans: List<CollBookBean>?) { //检测书籍更新
@ -250,7 +250,7 @@ class BookFragment : NovelBaseFragment() {
//跟原先比较
mList.clear()
mList.addAll(BookRepository.getInstance().collBooks)
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
}
override fun onError(e: Throwable) {}

@ -19,7 +19,7 @@ import java.util.*
class BookListFragment : NovelBaseFragment() {
private var mAdapter: RankListAdapter? = null
private lateinit var mAdapter: RankListAdapter
private var mList: MutableList<RankByUpdateResp.BookBean> = ArrayList()
private var sex: String = ""
private var dateType: String = ""
@ -47,15 +47,15 @@ class BookListFragment : NovelBaseFragment() {
override fun initData() {
getData()
mAdapter!!.setOnLoadMoreListener(object : OnLoadMoreListener {
mAdapter.setOnLoadMoreListener(object : OnLoadMoreListener {
override fun onLoadMore() {
if (mAdapter!!.isLoadingMore) {
if (mAdapter.isLoadingMore) {
} else {
if (loadSize >= COMMENT_SIZE) {
mAdapter!!.isLoadingMore = true
mAdapter.isLoadingMore = true
mList.add(RankByUpdateResp.BookBean())
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
page++
getData()
}
@ -75,15 +75,15 @@ class BookListFragment : NovelBaseFragment() {
if (response.isSuccessful) {
if (response.body() != null) {
loadSize = response.body()!!.book.size
if (mAdapter!!.isLoadingMore) {
if (mAdapter.isLoadingMore) {
mList.removeAt(mList.size - 1)
mList.addAll(response.body()!!.book)
mAdapter!!.notifyDataSetChanged()
mAdapter!!.isLoadingMore = false
mAdapter.notifyDataSetChanged()
mAdapter.isLoadingMore = false
} else {
mList.clear()
mList.addAll(response.body()!!.book)
mAdapter!!.notifyDataSetChanged()
mAdapter.notifyDataSetChanged()
}
}
}

@ -21,11 +21,11 @@ import java.util.*
class ManFragment : NovelBaseFragment() {
private var mHumanAdapter: HumanAdapter? = null
private lateinit var mHumanAdapter: HumanAdapter
private val mHumanList = ArrayList<RecommendListResp.ListBean>()
private var mEditAdapter: EditRecommendAdapter? = null
private lateinit var mEditAdapter: EditRecommendAdapter
private val mEditList = ArrayList<RecommendListResp.ListBean>()
private var mRankAdapter: RankAdapter? = null
private lateinit var mRankAdapter: RankAdapter
private val mRankList = ArrayList<RecommendListResp.ListBean>()
override fun getLayoutId(): Int {
@ -70,7 +70,7 @@ class ManFragment : NovelBaseFragment() {
if (response.isSuccessful && response.body() != null) {
mHumanList.clear()
mHumanList.addAll(response.body()!!.list)
mHumanAdapter!!.notifyDataSetChanged()
mHumanAdapter.notifyDataSetChanged()
} else {
swipe.showError()
}
@ -87,7 +87,7 @@ class ManFragment : NovelBaseFragment() {
if (response.isSuccessful && response.body() != null) {
mEditList.clear()
mEditList.addAll(response.body()!!.list)
mEditAdapter!!.notifyDataSetChanged()
mEditAdapter.notifyDataSetChanged()
} else {
swipe.showError()
@ -106,7 +106,7 @@ class ManFragment : NovelBaseFragment() {
if (response.isSuccessful && response.body() != null) {
mRankList.clear()
mRankList.addAll(response.body()!!.list)
mRankAdapter!!.notifyDataSetChanged()
mRankAdapter.notifyDataSetChanged()
} else {
swipe.showError()
}

@ -21,8 +21,8 @@ import java.util.*
*/
class StackFragment : NovelBaseFragment() {
private var mAdapter: StackAdapter? = null
private var mList: MutableList<CategoryTypeResp.CategoryBean>? = null
private lateinit var mAdapter: StackAdapter
private var mList: MutableList<CategoryTypeResp.CategoryBean> =ArrayList()
override fun getLayoutId(): Int {
return R.layout.fragment_stack
@ -30,7 +30,6 @@ class StackFragment : NovelBaseFragment() {
override fun initView() {
EventManager.instance.registerSubscriber(this)
mList = ArrayList()
rlv_book_type.layoutManager = GridLayoutManager(activity, 2)
mAdapter = StackAdapter(mList)
rlv_book_type.adapter = mAdapter
@ -58,9 +57,9 @@ class StackFragment : NovelBaseFragment() {
if (event.isFail) {
refresh.showError()
} else {
mList!!.clear()
mList!!.addAll(event.result!!.category)
mAdapter!!.notifyDataSetChanged()
mList.clear()
mList.addAll(event.result!!.category)
mAdapter.notifyDataSetChanged()
}
}

@ -24,11 +24,11 @@ import java.util.*
class WomanFragment : NovelBaseFragment(), View.OnClickListener {
private var mHumanAdapter: HumanAdapter? = null
private lateinit var mHumanAdapter: HumanAdapter
private val mHumanList = ArrayList<RecommendListResp.ListBean>()
private var mEditAdapter: EditRecommendAdapter? = null
private lateinit var mEditAdapter: EditRecommendAdapter
private val mEditList = ArrayList<RecommendListResp.ListBean>()
private var mRankAdapter: RankAdapter? = null
private lateinit var mRankAdapter: RankAdapter
private val mRankList = ArrayList<RecommendListResp.ListBean>()
override fun getLayoutId(): Int {
@ -100,7 +100,7 @@ class WomanFragment : NovelBaseFragment(), View.OnClickListener {
if (response.isSuccessful && response.body() != null) {
mHumanList.clear()
mHumanList.addAll(response.body()!!.list)
mHumanAdapter!!.notifyDataSetChanged()
mHumanAdapter.notifyDataSetChanged()
} else {
swipe.showError()
@ -121,7 +121,7 @@ class WomanFragment : NovelBaseFragment(), View.OnClickListener {
if (response.isSuccessful && response.body() != null) {
mEditList.clear()
mEditList.addAll(response.body()!!.list)
mEditAdapter!!.notifyDataSetChanged()
mEditAdapter.notifyDataSetChanged()
} else {
swipe.showError()
@ -143,7 +143,7 @@ class WomanFragment : NovelBaseFragment(), View.OnClickListener {
if (response.isSuccessful && response.body() != null) {
mRankList.clear()
mRankList.addAll(response.body()!!.list)
mRankAdapter!!.notifyDataSetChanged()
mRankAdapter.notifyDataSetChanged()
} else {
swipe.showError()
}

@ -4,7 +4,7 @@ import com.novel.read.model.db.CollBookBean;
import com.novel.read.utlis.StringUtils;
/**
* create by 赵利君 on 2019/6/18
* create by zlj on 2019/6/18
* describe:
*/
public class BookDetailResp {

@ -8,7 +8,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* create by 赵利君 on 2019/6/20
* create by zlj on 2019/6/20
* describe:
*/
public class RankByUpdateResp implements Serializable {

@ -1,112 +0,0 @@
package com.novel.read.model.protocol;
import com.novel.read.base.MyApp;
import com.novel.read.utlis.StringUtils;
import java.io.Serializable;
import java.util.List;
/**
* create by 赵利君 on 2019/6/18
* describe:
*/
public class RecommendBookResp implements Serializable {
private List<BookBean> book;
public List<BookBean> getBook() {
return book;
}
public void setBook(List<BookBean> book) {
this.book = book;
}
public static class BookBean {
/**
* id : 139
* title : 丹师剑宗
* cover : http://dev.duoduvip.com/uploads/20190611/b81d831d3310041846444dacca57cef9.png
* description :
* hot : 83146
* like : 64
* author : 伯爵
* create_time : 1560191131
*/
private int id;
private String title;
private String cover;
private String description;
private int hot;
private int like;
private String author;
private int create_time;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title == null ? "" : StringUtils.INSTANCE.convertCC(title);
}
public void setTitle(String title) {
this.title = title;
}
public String getCover() {
return cover;
}
public void setCover(String cover) {
this.cover = cover;
}
public String getDescription() {
return description == null ? "" : StringUtils.INSTANCE.convertCC(StringUtils.INSTANCE.delete160(description));
}
public void setDescription(String description) {
this.description = description;
}
public int getHot() {
return hot;
}
public void setHot(int hot) {
this.hot = hot;
}
public int getLike() {
return like;
}
public void setLike(int like) {
this.like = like;
}
public String getAuthor() {
return author == null ? "" : StringUtils.INSTANCE.convertCC(author) ;
}
public void setAuthor(String author) {
this.author = author;
}
public int getCreate_time() {
return create_time;
}
public void setCreate_time(int create_time) {
this.create_time = create_time;
}
}
}

@ -0,0 +1,43 @@
package com.novel.read.model.protocol
import com.novel.read.base.MyApp
import com.novel.read.utlis.StringUtils
import java.io.Serializable
import java.util.ArrayList
/**
* create by zlj on 2019/6/18
* describe:
*/
class RecommendBookResp : Serializable {
var book: List<BookBean> = ArrayList()
class BookBean {
/**
* id : 139
* title : 丹师剑宗
* cover : http://dev.duoduvip.com/uploads/20190611/b81d831d3310041846444dacca57cef9.png
* description :
* hot : 83146
* like : 64
* author : 伯爵
* create_time : 1560191131
*/
var id: Int = 0
var title: String? = null
get() = if (field == null) "" else StringUtils.convertCC(field!!)
var cover: String? = null
var description: String? = null
get() = if (field == null) "" else StringUtils.convertCC(StringUtils.delete160(field!!))
var hot: Int = 0
var like: Int = 0
var author: String? = null
get() = if (field == null) "" else StringUtils.convertCC(field!!)
var create_time: Int = 0
}
}

@ -1,167 +0,0 @@
package com.novel.read.model.protocol;
import com.novel.read.base.MyApp;
import com.novel.read.utlis.StringUtils;
import java.io.Serializable;
import java.util.List;
/**
* create by 赵利君 on 2019/6/19
* describe:
*/
public class RecommendListResp implements Serializable {
private List<ListBean> list;
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
/**
* id : 5
* book_id : 10
* type : 1
* gender : 1
* sort : 10
* create_time : 1560129944
* update_time : 1560129944
* delete_time : null
* book_title : 重生之末世宝典
* book_cover : http://api.duoduvip.com/uploads/nocover.jpg
*/
private int id;
private int book_id;
private int type;
private int gender;
private int sort;
private int create_time;
private int update_time;
private Object delete_time;
private String book_title;
private String book_cover;
private String author;
private String description;
private int hot;
private int like;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getBook_id() {
return book_id;
}
public void setBook_id(int book_id) {
this.book_id = book_id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getGender() {
return gender;
}
public void setGender(int gender) {
this.gender = gender;
}
public int getSort() {
return sort;
}
public void setSort(int sort) {
this.sort = sort;
}
public int getCreate_time() {
return create_time;
}
public void setCreate_time(int create_time) {
this.create_time = create_time;
}
public int getUpdate_time() {
return update_time;
}
public void setUpdate_time(int update_time) {
this.update_time = update_time;
}
public Object getDelete_time() {
return delete_time;
}
public void setDelete_time(Object delete_time) {
this.delete_time = delete_time;
}
public String getBook_title() {
return book_title == null ? "" : StringUtils.INSTANCE.convertCC(book_title);
}
public void setBook_title(String book_title) {
this.book_title = book_title;
}
public String getBook_cover() {
return book_cover == null ? "" : book_cover;
}
public void setBook_cover(String book_cover) {
this.book_cover = book_cover;
}
public String getAuthor() {
return author == null ? "" : StringUtils.INSTANCE.convertCC(author);
}
public void setAuthor(String author) {
this.author = author;
}
public String getDescription() {
return description == null ? "" : StringUtils.INSTANCE.convertCC(StringUtils.INSTANCE.delete160(description));
}
public void setDescription(String description) {
this.description = description;
}
public String getHot() {
return String.valueOf(hot);
}
public void setHot(int hot) {
this.hot = hot;
}
public String getLike() {
return like+"%";
}
public void setLike(int like) {
this.like = like;
}
}
}

@ -0,0 +1,67 @@
package com.novel.read.model.protocol
import com.novel.read.base.MyApp
import com.novel.read.utlis.StringUtils
import java.io.Serializable
import java.util.ArrayList
/**
* create by zlj on 2019/6/19
* describe:
*/
class RecommendListResp : Serializable {
var list: List<ListBean> = ArrayList()
class ListBean {
/**
* id : 5
* book_id : 10
* type : 1
* gender : 1
* sort : 10
* create_time : 1560129944
* update_time : 1560129944
* delete_time : null
* book_title : 重生之末世宝典
* book_cover : http://api.duoduvip.com/uploads/nocover.jpg
*/
var id: Int = 0
var book_id: Int = 0
var type: Int = 0
var gender: Int = 0
var sort: Int = 0
var create_time: Int = 0
var update_time: Int = 0
var delete_time: Any? = null
var book_title: String? = null
get() = if (field == null) "" else StringUtils.convertCC(field!!)
var book_cover: String? = null
get() = if (field == null) "" else field
var author: String? = null
get() = if (field == null) "" else StringUtils.convertCC(field!!)
var description: String? = null
get() = if (field == null) "" else StringUtils.convertCC(StringUtils.delete160(field!!))
private var hot: Int = 0
private var like: Int = 0
fun getHot(): String {
return hot.toString()
}
fun setHot(hot: Int) {
this.hot = hot
}
fun getLike(): String {
return "$like%"
}
fun setLike(like: Int) {
this.like = like
}
}
}

@ -1,135 +0,0 @@
package com.novel.read.model.protocol;
import com.novel.read.base.MyApp;
import com.novel.read.utlis.StringUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class SearchResp implements Serializable {
/**
* book : [{"id":92,"title":"极品全能狂少","category_id":3,"cover":"http://dev.duoduvip.com/uploads/20190610/64512ebcd7e79923bc59ffc1d3afb597.png","description":"","hot":99437,"like":41,"author":"一支烟的快感","create_time":1560159443},{"id":170,"title":"抬棺匠","category_id":1,"cover":"http://dev.duoduvip.com/uploads/20190611/19cfa1ff96a4bec66b14e16b997ffba9.png","description":"","hot":99184,"like":54,"author":"陈八仙","create_time":1560205316},{"id":47,"title":"都市超级医圣","category_id":3,"cover":"http://dev.duoduvip.com/uploads/20190610/868b69fdf75dc303ca70fef4ccc8bc87.png","description":" 财法侣地,修行其实是一项非常耗钱的奢侈运动。无意中得到传说中道教学家,炼丹家,医药家葛洪的传承,淳朴的山里人葛东旭开始努力赚钱。当大多数人还在读高中时,他为了炼丹修行已经开始一边读书一边赚钱。当大多数人读大学还在为交女朋友的开销愁时,他已经是一名老板。当大多数人大学毕业在为找工作四处投简历,当富二代开着跑车,在美女面前炫耀时,他已经是一名级富一代,当然还是一名大隐隐于市的至尊医圣。<br> 各位书友要是觉得《都市超级医圣》还不错的话请不要忘记向您QQ群和微博里的朋友推荐哦!都市超级医圣最新章节,都市超级医圣无弹窗,都市超级医圣全文阅读.","hot":99056,"like":21,"author":"断桥残雪","create_time":1560129236},{"id":105,"title":"神医高手在都市","category_id":3,"cover":"http://dev.duoduvip.com/uploads/20190610/ccab1913cdaf9aee2cfeaef84910a700.png","description":"","hot":98517,"like":28,"author":"复仇","create_time":1560167691},{"id":21,"title":"夜少的心尖宝贝","category_id":1,"cover":"http://dev.duoduvip.com/uploads/20190609/c0f5c2ff7fa532e4bd399625e5edacf3.png","description":" 简介:<br> 为了能正大光明的睡乔小姐,夜少不惜采用了108种追妻方式结果有两个小萝卜头冒了出来,对他说,\u201c帅叔叔,你想追我妈咪吗我们可以教你哦\u201d夜少掀桌,\u201c叫什么叔叔乖,叫爹地\u201d夜少一生最风光得意的事情就是睡了乔小姐,留下了种,让她给自己生了两个宝贝儿子,在她的身上永恒的打上了自己的烙印夜少漫漫追妻之旅,甜甜甜,超甜宠文,1v1<br> 各位书友要是觉得《夜少的心尖宝贝》还不错的话请不要忘记向您QQ群和微博里的朋友推荐哦!夜少的心尖宝贝最新章节,夜少的心尖宝贝无弹窗,夜少的心尖宝贝全文阅读.","hot":97296,"like":64,"author":"慕欢颜","create_time":1560095819},{"id":102,"title":"万域灵神","category_id":4,"cover":"http://dev.duoduvip.com/uploads/20190610/847703596e2af187311bb9f5ab7c26b4.png","description":"","hot":97157,"like":56,"author":"乾多多","create_time":1560165904},{"id":87,"title":"至尊剑皇","category_id":4,"cover":"http://dev.duoduvip.com/uploads/20190610/711a87b0df3446885739845fba33fce4.png","description":"","hot":96684,"like":23,"author":"半步沧桑","create_time":1560156886},{"id":166,"title":"生活在美利坚的森林游侠","category_id":3,"cover":"http://dev.duoduvip.com/uploads/20190611/d663219f43a8bbba3d0718637fa0724a.png","description":"","hot":96427,"like":77,"author":"酱疙瘩","create_time":1560203771},{"id":171,"title":"三界红包群","category_id":3,"cover":"http://dev.duoduvip.com/uploads/nocover.jpg","description":"","hot":96362,"like":47,"author":"小教主","create_time":1560205922},{"id":131,"title":"命之途","category_id":2,"cover":"http://dev.duoduvip.com/uploads/nocover.jpg","description":"","hot":94835,"like":27,"author":"莫若梦兮","create_time":1560186387}]
* limit : 10
*/
private int limit;
private List<BookBean> book;
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
public List<BookBean> getBook() {
if (book == null) {
return new ArrayList<>();
}
return book;
}
public void setBook(List<BookBean> book) {
this.book = book;
}
public static class BookBean {
/**
* id : 92
* title : 极品全能狂少
* category_id : 3
* cover : http://dev.duoduvip.com/uploads/20190610/64512ebcd7e79923bc59ffc1d3afb597.png
* description :
* hot : 99437
* like : 41
* author : 一支烟的快感
* create_time : 1560159443
*/
private int id;
private String title;
private int category_id;
private String cover;
private String description;
private int hot;
private int like;
private String author;
private int create_time;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title == null ? "" : StringUtils.INSTANCE.convertCC(title);
}
public void setTitle(String title) {
this.title = title;
}
public int getCategory_id() {
return category_id;
}
public void setCategory_id(int category_id) {
this.category_id = category_id;
}
public String getCover() {
return cover == null ? "" : cover;
}
public void setCover(String cover) {
this.cover = cover;
}
public String getDescription() {
return description == null ? "" : StringUtils.INSTANCE.convertCC(StringUtils.INSTANCE.delete160(description));
}
public void setDescription(String description) {
this.description = description;
}
public int getHot() {
return hot;
}
public void setHot(int hot) {
this.hot = hot;
}
public int getLike() {
return like;
}
public void setLike(int like) {
this.like = like;
}
public String getAuthor() {
return author == null ? "" : StringUtils.INSTANCE.convertCC(author);
}
public void setAuthor(String author) {
this.author = author;
}
public int getCreate_time() {
return create_time;
}
public void setCreate_time(int create_time) {
this.create_time = create_time;
}
}
}

@ -0,0 +1,46 @@
package com.novel.read.model.protocol
import com.novel.read.utlis.StringUtils
import java.io.Serializable
import java.util.ArrayList
class SearchResp : Serializable {
/**
* book : [{"id":92,"title":"极品全能狂少","category_id":3,"cover":"http://dev.duoduvip.com/uploads/20190610/64512ebcd7e79923bc59ffc1d3afb597.png","description":"","hot":99437,"like":41,"author":"一支烟的快感","create_time":1560159443},{"id":170,"title":"抬棺匠","category_id":1,"cover":"http://dev.duoduvip.com/uploads/20190611/19cfa1ff96a4bec66b14e16b997ffba9.png","description":"","hot":99184,"like":54,"author":"陈八仙","create_time":1560205316},{"id":47,"title":"都市超级医圣","category_id":3,"cover":"http://dev.duoduvip.com/uploads/20190610/868b69fdf75dc303ca70fef4ccc8bc87.png","description":" 财法侣地,修行其实是一项非常耗钱的奢侈运动。无意中得到传说中道教学家,炼丹家,医药家葛洪的传承,淳朴的山里人葛东旭开始努力赚钱。当大多数人还在读高中时,他为了炼丹修行已经开始一边读书一边赚钱。当大多数人读大学还在为交女朋友的开销愁时,他已经是一名老板。当大多数人大学毕业在为找工作四处投简历,当富二代开着跑车,在美女面前炫耀时,他已经是一名级富一代,当然还是一名大隐隐于市的至尊医圣。<br></br> 各位书友要是觉得《都市超级医圣》还不错的话请不要忘记向您QQ群和微博里的朋友推荐哦!都市超级医圣最新章节,都市超级医圣无弹窗,都市超级医圣全文阅读.","hot":99056,"like":21,"author":"断桥残雪","create_time":1560129236},{"id":105,"title":"神医高手在都市","category_id":3,"cover":"http://dev.duoduvip.com/uploads/20190610/ccab1913cdaf9aee2cfeaef84910a700.png","description":"","hot":98517,"like":28,"author":"复仇","create_time":1560167691},{"id":21,"title":"夜少的心尖宝贝","category_id":1,"cover":"http://dev.duoduvip.com/uploads/20190609/c0f5c2ff7fa532e4bd399625e5edacf3.png","description":" 简介:<br></br> 为了能正大光明的睡乔小姐,夜少不惜采用了108种追妻方式结果有两个小萝卜头冒了出来,对他说,\u201c帅叔叔,你想追我妈咪吗我们可以教你哦\u201d夜少掀桌,\u201c叫什么叔叔乖,叫爹地\u201d夜少一生最风光得意的事情就是睡了乔小姐,留下了种,让她给自己生了两个宝贝儿子,在她的身上永恒的打上了自己的烙印夜少漫漫追妻之旅,甜甜甜,超甜宠文,1v1<br></br> 各位书友要是觉得《夜少的心尖宝贝》还不错的话请不要忘记向您QQ群和微博里的朋友推荐哦!夜少的心尖宝贝最新章节,夜少的心尖宝贝无弹窗,夜少的心尖宝贝全文阅读.","hot":97296,"like":64,"author":"慕欢颜","create_time":1560095819},{"id":102,"title":"万域灵神","category_id":4,"cover":"http://dev.duoduvip.com/uploads/20190610/847703596e2af187311bb9f5ab7c26b4.png","description":"","hot":97157,"like":56,"author":"乾多多","create_time":1560165904},{"id":87,"title":"至尊剑皇","category_id":4,"cover":"http://dev.duoduvip.com/uploads/20190610/711a87b0df3446885739845fba33fce4.png","description":"","hot":96684,"like":23,"author":"半步沧桑","create_time":1560156886},{"id":166,"title":"生活在美利坚的森林游侠","category_id":3,"cover":"http://dev.duoduvip.com/uploads/20190611/d663219f43a8bbba3d0718637fa0724a.png","description":"","hot":96427,"like":77,"author":"酱疙瘩","create_time":1560203771},{"id":171,"title":"三界红包群","category_id":3,"cover":"http://dev.duoduvip.com/uploads/nocover.jpg","description":"","hot":96362,"like":47,"author":"小教主","create_time":1560205922},{"id":131,"title":"命之途","category_id":2,"cover":"http://dev.duoduvip.com/uploads/nocover.jpg","description":"","hot":94835,"like":27,"author":"莫若梦兮","create_time":1560186387}]
* limit : 10
*/
var limit: Int = 0
var book: List<BookBean> = ArrayList()
class BookBean {
/**
* id : 92
* title : 极品全能狂少
* category_id : 3
* cover : http://dev.duoduvip.com/uploads/20190610/64512ebcd7e79923bc59ffc1d3afb597.png
* description :
* hot : 99437
* like : 41
* author : 一支烟的快感
* create_time : 1560159443
*/
var id: Int = 0
var title: String? = null
get() = if (field == null) "" else StringUtils.convertCC(field!!)
var category_id: Int = 0
var cover: String? = null
get() = if (field == null) "" else field
var description: String? = null
get() = if (field == null) "" else StringUtils.convertCC(StringUtils.delete160(field!!))
var hot: Int = 0
var like: Int = 0
var author: String? = null
get() = if (field == null) "" else StringUtils.convertCC(field!!)
var create_time: Int = 0
}
}

@ -1,138 +0,0 @@
package com.novel.read.model.protocol;
/**
* create by 赵利君 on 2019/6/25
* describe:
*/
public class VersionResp {
/**
* version : {"id":2,"version":"1.0.0","size":"5096","content":"正式上线","download":"https://play.google.com/store/apps/details?id=com.freebook.bookreader","coerce":1,"status":1,"push_time":1560060702,"create_time":1560060772,"update_time":1560752842,"delete_time":null}
*/
private VersionBean version;
public VersionBean getVersion() {
return version;
}
public void setVersion(VersionBean version) {
this.version = version;
}
public static class VersionBean {
/**
* id : 2
* version : 1.0.0
* size : 5096
* content : 正式上线
* download : https://play.google.com/store/apps/details?id=com.freebook.bookreader
* coerce : 1
* status : 1
* push_time : 1560060702
* create_time : 1560060772
* update_time : 1560752842
* delete_time : null
*/
private int id;
private String version;
private String size;
private String content;
private String download;
private int coerce;
private int status;
private int push_time;
private int create_time;
private int update_time;
private Object delete_time;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getDownload() {
return download;
}
public void setDownload(String download) {
this.download = download;
}
public int getCoerce() {
return coerce;
}
public void setCoerce(int coerce) {
this.coerce = coerce;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public int getPush_time() {
return push_time;
}
public void setPush_time(int push_time) {
this.push_time = push_time;
}
public int getCreate_time() {
return create_time;
}
public void setCreate_time(int create_time) {
this.create_time = create_time;
}
public int getUpdate_time() {
return update_time;
}
public void setUpdate_time(int update_time) {
this.update_time = update_time;
}
public Object getDelete_time() {
return delete_time;
}
public void setDelete_time(Object delete_time) {
this.delete_time = delete_time;
}
}
}

@ -0,0 +1,42 @@
package com.novel.read.model.protocol
/**
* create by 赵利君 on 2019/6/25
* describe:
*/
class VersionResp {
/**
* version : {"id":2,"version":"1.0.0","size":"5096","content":"正式上线","download":"https://play.google.com/store/apps/details?id=com.freebook.bookreader","coerce":1,"status":1,"push_time":1560060702,"create_time":1560060772,"update_time":1560752842,"delete_time":null}
*/
var version: VersionBean = VersionBean()
class VersionBean {
/**
* id : 2
* version : 1.0.0
* size : 5096
* content : 正式上线
* download : https://play.google.com/store/apps/details?id=com.freebook.bookreader
* coerce : 1
* status : 1
* push_time : 1560060702
* create_time : 1560060772
* update_time : 1560752842
* delete_time : null
*/
var id: Int = 0
var version: String? = null
var size: String? = null
var content: String? = null
var download: String? = null
var coerce: Int = 0
var status: Int = 0
var push_time: Int = 0
var create_time: Int = 0
var update_time: Int = 0
var delete_time: Any? = null
}
}

@ -20,7 +20,7 @@ import kotlinx.android.synthetic.main.layout_setting.*
class ReadSettingDialog(mActivity: Activity, private var mPageLoader: PageLoader) :
Dialog(mActivity, R.style.ReadSettingDialog) {
private var mPageStyleAdapter: PageStyleAdapter? = null
private lateinit var mPageStyleAdapter: PageStyleAdapter
private var mSettingManager: ReadSettingManager = ReadSettingManager.getInstance()
private var mPageMode: PageMode? = null
@ -88,7 +88,7 @@ class ReadSettingDialog(mActivity: Activity, private var mPageLoader: PageLoader
read_setting_rv_bg.layoutManager = GridLayoutManager(context, 4)
read_setting_rv_bg.adapter = mPageStyleAdapter
mPageStyleAdapter!!.setPageStyleChecked(mPageStyle!!)
mPageStyleAdapter.setPageStyleChecked(mPageStyle!!)
}

@ -5,6 +5,8 @@ import android.graphics.drawable.GradientDrawable
import android.os.Build
import android.view.View
import com.novel.read.widget.page.PageAnimation
import kotlin.math.atan2
import kotlin.math.hypot
/**
* Created by zlj
@ -419,7 +421,7 @@ class SimulationPageAnim(w: Int, h: Int, view: View, listener: OnPageChangeListe
mCurrentPageShadow = mFrontShadowDrawableHBT
}
rotateDegrees = Math.toDegrees(
Math.atan2(
atan2(
(mBezierControl2.y - mTouchY).toDouble(),
(mBezierControl2.x - mTouchX).toDouble()
)
@ -431,7 +433,7 @@ class SimulationPageAnim(w: Int, h: Int, view: View, listener: OnPageChangeListe
else
temp = mBezierControl2.y
val hmg = Math.hypot(mBezierControl2.x.toDouble(), temp.toDouble()).toInt()
val hmg = hypot(mBezierControl2.x.toDouble(), temp.toDouble()).toInt()
if (hmg > mMaxLength)
mCurrentPageShadow!!
.setBounds(

Loading…
Cancel
Save