From 52c985a473c4a3880363b0eaaaf01b81a839facc Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 15 Sep 2022 11:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/bookmark/BookmarkDialog.kt | 5 +- app/src/main/res/layout/dialog_bookmark.xml | 152 ++++++++++-------- 2 files changed, 85 insertions(+), 72 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/bookmark/BookmarkDialog.kt b/app/src/main/java/io/legado/app/ui/book/bookmark/BookmarkDialog.kt index 838d60bfe..11405efca 100644 --- a/app/src/main/java/io/legado/app/ui/book/bookmark/BookmarkDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/bookmark/BookmarkDialog.kt @@ -29,10 +29,13 @@ class BookmarkDialog() : BaseDialogFragment(R.layout.dialog_bookmark) { override fun onStart() { super.onStart() - setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) + setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT) + dialog?.window?.setBackgroundDrawableResource(R.color.transparent) } override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { + view.setBackgroundResource(R.color.transparent) + view.setOnClickListener { dismiss() } binding.toolBar.setBackgroundColor(primaryColor) val arguments = arguments ?: let { dismiss() diff --git a/app/src/main/res/layout/dialog_bookmark.xml b/app/src/main/res/layout/dialog_bookmark.xml index ebf2e4609..7c1f49627 100644 --- a/app/src/main/res/layout/dialog_bookmark.xml +++ b/app/src/main/res/layout/dialog_bookmark.xml @@ -1,110 +1,120 @@ - + android:layout_height="match_parent" + android:padding="16dp"> - + android:layout_gravity="center" + android:background="@drawable/shape_card_view" + android:orientation="vertical" + tools:ignore="UselessParent"> - - - + - + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:textColor="@color/primaryText" /> - + + + android:orientation="vertical" + android:padding="16dp"> - + android:paddingTop="3dp"> - + - + - + android:paddingTop="3dp"> - + - + - + - - - + - + android:paddingLeft="12dp" + android:paddingRight="12dp" + app:flexWrap="wrap" + app:justifyContent="space_between"> - + android:orientation="horizontal"> + + + + - + - - + + + \ No newline at end of file