User(name = "takuji31", birthDay = "1987/03/01"),
User(name = "takuji32", birthDay = "1987/03/02"),
User(name = "takuji33", birthDay = "1987/03/03"),
User(name = "takuji24884", birthDay = null)
)
val binding: ActivityDataClassBinding by lazy {
DataBindingUtil.setContentView<ActivityDataClassBinding>(this, R.layout.activity_data_class)
}
override fun onCreate(savedInstanceState: Bundle?) {
binding.user = users.last()
binding.randomButtonClickListener = View.OnClickListener {
binding.user = users[0]
users = users.drop(1) + binding.user
}
}
} MB[ZOPU/VMMͷEFMFHBUFΛͬͯ όΠϯσΟϯάΫϥεͷ ϓϩύςΟʔΛ༻ҙ͢ΔͱΑ͍ ࣗಈੜ͞ΕΔΫϥεʹఆ໊ٛͨ͠લͱಉ ͡ϓϩύςΟʔ ਖ਼֬ʹTFUUFSHFUUFS ͕ ੜ͞ΕΔͷͰɺηοτ͢Δͱ͕ө͞Ε Δ