init the fragments array with 5 entries only

This commit is contained in:
tibbi 2016-11-26 20:13:16 +01:00
parent 215883014c
commit d1c0a27538
1 changed files with 2 additions and 2 deletions

View File

@ -10,10 +10,10 @@ import com.simplemobiletools.notes.fragments.NoteFragment
import com.simplemobiletools.notes.models.Note
class NotesPagerAdapter(fm: FragmentManager, private val notes: List<Note>) : FragmentStatePagerAdapter(fm) {
lateinit var fragments: SparseArray<NoteFragment>
var fragments: SparseArray<NoteFragment>
init {
fragments = SparseArray(10)
fragments = SparseArray(5)
}
override fun getCount() = notes.size