|
|
@ -31,11 +31,11 @@ class ReadRecordActivity : BaseActivity<ActivityReadRecordBinding>() { |
|
|
|
initData() |
|
|
|
initData() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun initView() { |
|
|
|
private fun initView() = with(binding) { |
|
|
|
binding.readRecord.tvBookName.setText(R.string.all_read_time) |
|
|
|
readRecord.tvBookName.setText(R.string.all_read_time) |
|
|
|
adapter = RecordAdapter(this) |
|
|
|
adapter = RecordAdapter(this@ReadRecordActivity) |
|
|
|
binding.recyclerView.adapter = adapter |
|
|
|
recyclerView.adapter = adapter |
|
|
|
binding.readRecord.ivRemove.onClick { |
|
|
|
readRecord.ivRemove.onClick { |
|
|
|
alert(R.string.delete, R.string.sure_del) { |
|
|
|
alert(R.string.delete, R.string.sure_del) { |
|
|
|
okButton { |
|
|
|
okButton { |
|
|
|
App.db.readRecordDao().clear() |
|
|
|
App.db.readRecordDao().clear() |
|
|
|