pull/32/head
GKF 6 years ago
parent 317df0dd55
commit 3101a90393
  1. 3
      app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt
  2. 7
      app/src/main/res/layout/fragment_bookshelf.xml
  3. 1
      app/src/main/res/values/strings.xml

@ -13,8 +13,10 @@ import io.legado.app.R
import io.legado.app.base.BaseFragment
import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookGroup
import io.legado.app.lib.theme.ThemeStore
import kotlinx.android.synthetic.main.fragment_bookshelf.*
import kotlinx.android.synthetic.main.view_title_bar.*
import org.jetbrains.anko.textColor
class BookshelfFragment : BaseFragment(R.layout.fragment_bookshelf) {
@ -35,6 +37,7 @@ class BookshelfFragment : BaseFragment(R.layout.fragment_bookshelf) {
}
private fun initRecyclerView() {
tv_recent_reading.textColor = ThemeStore.accentColor(tv_recent_reading.context)
rv_book_group.layoutManager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
bookGroupAdapter = BookGroupAdapter()
rv_book_group.adapter = bookGroupAdapter

@ -17,6 +17,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_recent_reading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="@string/recent_reading" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_bookshelf"
android:layout_width="match_parent"

@ -33,6 +33,7 @@
<string name="enable">启用</string>
<string name="bookshelf">书架</string>
<string name="recent_reading">最近阅读</string>
<string name="last_read">最后阅读</string>
<string name="read_summary">让阅读成为一种习惯。</string>
<string name="update_log">更新日志</string>

Loading…
Cancel
Save