diff --git a/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt b/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt index ea467af80..717d1d8d7 100644 --- a/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt +++ b/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt @@ -59,7 +59,7 @@ class ReadRecordActivity : BaseActivity() { readRecord.tvBookName.setText(R.string.all_read_time) adapter = RecordAdapter(this@ReadRecordActivity) recyclerView.adapter = adapter - readRecord.ivRemove.onClick { + readRecord.tvRemove.onClick { alert(R.string.delete, R.string.sure_del) { okButton { App.db.readRecordDao.clear() @@ -112,7 +112,7 @@ class ReadRecordActivity : BaseActivity() { override fun registerListener(holder: ItemViewHolder, binding: ItemReadRecordBinding) { binding.apply { - ivRemove.onClick { + tvRemove.onClick { getItem(holder.layoutPosition)?.let { item -> sureDelAlert(item) } diff --git a/app/src/main/res/layout/item_read_record.xml b/app/src/main/res/layout/item_read_record.xml index 2587d759a..d9d1f50ea 100644 --- a/app/src/main/res/layout/item_read_record.xml +++ b/app/src/main/res/layout/item_read_record.xml @@ -1,21 +1,22 @@ - + android:paddingRight="10dp"> + android:padding="6dp" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_book_name" + app:layout_constraintRight_toLeftOf="@+id/tv_remove" /> - + android:padding="6dp" + android:text="@string/clear" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="@id/tv_book_name" + app:layout_constraintBottom_toBottomOf="@+id/tv_read_time" /> - \ No newline at end of file + \ No newline at end of file