pull/159/head
yangyxd 5 years ago
commit 4b940ab530
  1. 5
      app/src/main/assets/updateLog.md
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt
  3. 6
      app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt
  4. 14
      app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt
  5. 1
      app/src/main/res/layout/item_text.xml

@ -2,12 +2,13 @@
* 旧版数据导入教程:先在旧版阅读(2.x)中进行备份,然后在新版阅读(3.x)【我的】->【备份与恢复】,选择【导入旧版本数据】。
* 请关注[开源阅读]()支持我,同时关注合作公众号[小说拾遗](),阅读公众号小编。
**2020/03/15**
**2020/03/16**
* 弄了个企业公众号[开源阅读](),后面弄好后会把原来的开源阅读软件迁移过来
* 修复滚动模式切换章节位置不归0的bug
* 修复文字选择更多菜单在部分手机上报错的bug
* 修复文字选择菜单问题
**2020/03/14**
**2020/03/15**
* 加载正文无书源时自动换源
**2020/03/14**

@ -126,7 +126,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
}
}?.onError {
toast(R.string.error_load_toc)
} ?: autoChangeSource(book.name, book.author)
}
}
}
}

@ -128,6 +128,12 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
context.toast(e.localizedMessage ?: "ERROR")
}
}
else -> item.intent?.let {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
it.putExtra(Intent.EXTRA_PROCESS_TEXT, callBack.selectedText)
context.startActivity(it)
}
}
}
}

@ -7,6 +7,7 @@ import androidx.lifecycle.Observer
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import io.legado.app.App
import io.legado.app.R
import io.legado.app.base.BaseFragment
@ -74,6 +75,19 @@ class BooksFragment : BaseFragment(R.layout.fragment_books),
booksAdapter = BooksAdapterGrid(requireContext(),this)
}
rv_bookshelf.adapter = booksAdapter
booksAdapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
override fun onItemRangeInserted(positionStart: Int, itemCount: Int) {
if (positionStart == 0) {
}
}
override fun onItemRangeMoved(fromPosition: Int, toPosition: Int, itemCount: Int) {
if (toPosition == 0) {
}
}
})
}
private fun upRecyclerData() {

@ -9,6 +9,7 @@
android:gravity="center"
android:padding="5dp"
android:maxLines="1"
android:scrollbars="none"
android:textColor="@color/tv_text_default"
android:textSize="14sp"
tools:ignore="UnusedAttribute" />

Loading…
Cancel
Save