pull/32/head
gedoor 6 years ago
parent a3ac41f5ff
commit 68f4c7a87a
  1. 6
      app/src/main/java/io/legado/app/ui/main/bookshelf/BookGroupAdapter.kt
  2. 5
      app/src/main/res/layout/item_book_group.xml

@ -1,10 +1,12 @@
package io.legado.app.ui.main.bookshelf
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.paging.PagedListAdapter
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.RecyclerView
import io.legado.app.R
import io.legado.app.data.entities.BookGroup
class BookGroupAdapter : PagedListAdapter<BookGroup, BookGroupAdapter.MyViewHolder>(DIFF_CALLBACK) {
@ -23,11 +25,11 @@ class BookGroupAdapter : PagedListAdapter<BookGroup, BookGroupAdapter.MyViewHold
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
return MyViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.item_book_group, parent, false))
}
override fun onBindViewHolder(holder: MyViewHolder, position: Int) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
class MyViewHolder(view: View) : RecyclerView.ViewHolder(view) {

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_margin="5dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Loading…
Cancel
Save