Created
April 5, 2020 13:43
-
-
Save klukwist/8654e9ea0bd58a21bb383a0a47cc3584 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainFragment : Fragment() { | |
private val adapter = | |
object : ProstoAdapter<ItemPersonBinding, Person>() { | |
override val viewModel = PersonItemViewModel() | |
override val layoutId = R.layout.item_person | |
} | |
override fun onActivityCreated(savedInstanceState: Bundle?) { | |
super.onActivityCreated(savedInstanceState) | |
mainRecyclerView.adapter = adapter | |
} | |
fun setNewPersonList(persons: List<Person>){ | |
adapter.setData(personList) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment