diff --git a/app/src/main/java/io/legado/app/ui/book/manage/BookAdapter.kt b/app/src/main/java/io/legado/app/ui/book/manage/BookAdapter.kt index 33224a3c6..875832190 100644 --- a/app/src/main/java/io/legado/app/ui/book/manage/BookAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/manage/BookAdapter.kt @@ -6,6 +6,7 @@ import android.view.View import android.view.ViewGroup import androidx.core.os.bundleOf import androidx.recyclerview.widget.RecyclerView +import io.legado.app.R import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.data.entities.Book @@ -52,6 +53,11 @@ class BookAdapter(context: Context, val callBack: CallBack) : tvAuthor.visibility = if (item.author.isEmpty()) View.GONE else View.VISIBLE tvGroupS.text = getGroupName(item.group) checkbox.isChecked = selectedBooks.contains(item) + if (item.isLocalBook()) { + tvOrigin.setText(R.string.local_book) + } else { + tvOrigin.text = item.originName + } } } diff --git a/app/src/main/res/layout/item_arrange_book.xml b/app/src/main/res/layout/item_arrange_book.xml index 15e33e291..48ae5a58a 100644 --- a/app/src/main/res/layout/item_arrange_book.xml +++ b/app/src/main/res/layout/item_arrange_book.xml @@ -1,9 +1,10 @@ + app:layout_constraintLeft_toRightOf="@id/checkbox" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintLeft_toRightOf="@+id/tv_name" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="@+id/tv_name" + tools:ignore="RtlHardcoded" /> + + + app:layout_constraintLeft_toRightOf="@+id/tv_origin" + app:layout_constraintRight_toLeftOf="@+id/tv_group" + app:layout_constraintTop_toBottomOf="@id/tv_author" /> + app:layout_constraintRight_toLeftOf="@+id/tv_delete" + app:layout_constraintTop_toBottomOf="@id/tv_author" /> + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_author" /> \ No newline at end of file