|
|
@ -49,7 +49,7 @@ class ArrangeBookActivity : VMBaseActivity<ArrangeBookViewModel>(R.layout.activi |
|
|
|
adapter = ArrangeBookAdapter(this, this) |
|
|
|
adapter = ArrangeBookAdapter(this, this) |
|
|
|
recycler_view.adapter = adapter |
|
|
|
recycler_view.adapter = adapter |
|
|
|
cb_selected_all.onClick { |
|
|
|
cb_selected_all.onClick { |
|
|
|
adapter.selectAll(cb_selected_all.isChecked) |
|
|
|
adapter.selectAll(!adapter.isSelectAll()) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -70,11 +70,7 @@ class ArrangeBookActivity : VMBaseActivity<ArrangeBookViewModel>(R.layout.activi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun upSelectCount() { |
|
|
|
override fun upSelectCount() { |
|
|
|
if (adapter.selectedBooks.size == 0) { |
|
|
|
cb_selected_all.isChecked = adapter.isSelectAll() |
|
|
|
cb_selected_all.isChecked = false |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
cb_selected_all.isChecked = adapter.selectedBooks.size >= adapter.getItems().size |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//重置全选的文字 |
|
|
|
//重置全选的文字 |
|
|
|
if (cb_selected_all.isChecked) { |
|
|
|
if (cb_selected_all.isChecked) { |
|
|
|
cb_selected_all.setText(R.string.cancel) |
|
|
|
cb_selected_all.setText(R.string.cancel) |
|
|
|