pull/366/head
gedoor 4 years ago
parent b5ead66441
commit a02d5525be
  1. 4
      app/src/main/java/io/legado/app/ui/widget/recycler/HeaderAdapterDataObserver.kt
  2. 7
      app/src/main/java/io/legado/app/ui/widget/recycler/UpLinearLayoutManager.kt

@ -1,8 +1,8 @@
package io.legado.app.help package io.legado.app.ui.widget.recycler
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
internal class AdapterDataObserverHeader( internal class HeaderAdapterDataObserver(
private var adapterDataObserver: RecyclerView.AdapterDataObserver, private var adapterDataObserver: RecyclerView.AdapterDataObserver,
private var headerCount: Int private var headerCount: Int
) : RecyclerView.AdapterDataObserver() { ) : RecyclerView.AdapterDataObserver() {

@ -4,12 +4,7 @@ import android.content.Context
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearSmoothScroller import androidx.recyclerview.widget.LinearSmoothScroller
class UpLinearLayoutManager: LinearLayoutManager { class UpLinearLayoutManager(val context: Context) : LinearLayoutManager(context) {
val context: Context
constructor(context: Context) : super(context) {
this.context = context
}
fun smoothScrollToPosition(position: Int) { fun smoothScrollToPosition(position: Int) {
smoothScrollToPosition(position, 0) smoothScrollToPosition(position, 0)

Loading…
Cancel
Save