You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
429 B
13 lines
429 B
package com.gyf.lib.model
|
|
|
|
import android.app.Application
|
|
import androidx.lifecycle.AndroidViewModel
|
|
import androidx.lifecycle.LiveData
|
|
import androidx.lifecycle.MutableLiveData
|
|
|
|
abstract class ScrollViewModel<T>(application: Application) : AndroidViewModel(application) {
|
|
protected val _data = MutableLiveData<MutableList<T>>(mutableListOf())
|
|
val data: LiveData<MutableList<T>> = _data
|
|
|
|
open val initSize: Int = 10
|
|
} |