diff --git a/app/src/main/java/io/legado/app/data/entities/BookGroup.kt b/app/src/main/java/io/legado/app/data/entities/BookGroup.kt index 4a24e9acb..5663f2e13 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookGroup.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookGroup.kt @@ -18,12 +18,12 @@ data class BookGroup( var show: Boolean = true ) : Parcelable { - fun getDefaultName(context: Context): String { + fun getManageName(context: Context): String { return when (groupId) { - AppConst.bookGroupAllId -> context.getString(R.string.all) - AppConst.bookGroupAudioId -> context.getString(R.string.audio) - AppConst.bookGroupLocalId -> context.getString(R.string.local) - AppConst.bookGroupNoneId -> context.getString(R.string.no_group) + AppConst.bookGroupAllId -> "$groupName(${context.getString(R.string.all)})" + AppConst.bookGroupAudioId -> "$groupName(${context.getString(R.string.audio)})" + AppConst.bookGroupLocalId -> "$groupName(${context.getString(R.string.local)})" + AppConst.bookGroupNoneId -> "$groupName(${context.getString(R.string.no_group)})" else -> groupName } } diff --git a/app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt b/app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt index c39924f09..8c768d6f5 100644 --- a/app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt @@ -107,7 +107,7 @@ class GroupManageDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener customView { layoutInflater.inflate(R.layout.dialog_edit_text, null).apply { editText = edit_view.apply { - hint = "分组名称" + setHint(R.string.group_name) } } } @@ -129,7 +129,7 @@ class GroupManageDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener customView { layoutInflater.inflate(R.layout.dialog_edit_text, null).apply { editText = edit_view.apply { - hint = "分组名称" + setHint(R.string.group_name) setText(bookGroup.groupName) } } @@ -187,7 +187,7 @@ class GroupManageDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener override fun convert(holder: ItemViewHolder, item: BookGroup, payloads: MutableList) { holder.itemView.apply { setBackgroundColor(context.backgroundColor) - tv_group.text = item.groupName + tv_group.text = item.getManageName(context) sw_show.isChecked = item.show tv_del.isGone = item.groupId < 0 sw_show.isGone = item.groupId >= 0 diff --git a/app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt b/app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt index f648527cb..059d31df0 100644 --- a/app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt @@ -128,7 +128,7 @@ class GroupSelectDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener customView { layoutInflater.inflate(R.layout.dialog_edit_text, null).apply { editText = edit_view.apply { - hint = "分组名称" + setHint(R.string.group_name) } } } @@ -150,7 +150,7 @@ class GroupSelectDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener customView { layoutInflater.inflate(R.layout.dialog_edit_text, null).apply { editText = edit_view.apply { - hint = "分组名称" + setHint(R.string.group_name) setText(bookGroup.groupName) } }