From cf0792529ce25e276d8743b033807b5aff38ec35 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 22 Feb 2020 15:42:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/book/read/TextActionMenu.kt | 4 ---- .../res/drawable/recyclerview_divider_horizontal.xml | 9 +++++++++ ...tem_divider.xml => recyclerview_divider_vertical.xml} | 0 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 app/src/main/res/drawable/recyclerview_divider_horizontal.xml rename app/src/main/res/drawable/{recyclerview_item_divider.xml => recyclerview_divider_vertical.xml} (100%) diff --git a/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt index 357830f0d..2437600ba 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt @@ -8,7 +8,6 @@ import android.widget.PopupWindow import androidx.appcompat.view.SupportMenuInflater import androidx.appcompat.view.menu.MenuBuilder import androidx.appcompat.view.menu.MenuItemImpl -import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import io.legado.app.R @@ -36,9 +35,6 @@ class TextActionMenu(context: Context, callBack: CallBack) : private fun initRecyclerView() = with(contentView) { val adapter = Adapter(context) recycler_view.layoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false) - recycler_view.addItemDecoration( - DividerItemDecoration(context, DividerItemDecoration.HORIZONTAL) - ) recycler_view.adapter = adapter val menu = MenuBuilder(context) SupportMenuInflater(context).inflate(R.menu.content_select_action, menu) diff --git a/app/src/main/res/drawable/recyclerview_divider_horizontal.xml b/app/src/main/res/drawable/recyclerview_divider_horizontal.xml new file mode 100644 index 000000000..d6b50f883 --- /dev/null +++ b/app/src/main/res/drawable/recyclerview_divider_horizontal.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/recyclerview_item_divider.xml b/app/src/main/res/drawable/recyclerview_divider_vertical.xml similarity index 100% rename from app/src/main/res/drawable/recyclerview_item_divider.xml rename to app/src/main/res/drawable/recyclerview_divider_vertical.xml