From 0d9bf328e992159fd96319a51d1a68d01a19a536 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 15 Sep 2022 10:53:59 +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 --- .../legado/app/ui/login/SourceLoginDialog.kt | 3 + app/src/main/res/layout/dialog_login.xml | 67 +++++++++++-------- 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt b/app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt index 3a904f4b8..1a32c0645 100644 --- a/app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt +++ b/app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt @@ -34,9 +34,12 @@ class SourceLoginDialog : BaseDialogFragment(R.layout.dialog_login) { override fun onStart() { super.onStart() 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() } val source = viewModel.source ?: return binding.toolBar.setBackgroundColor(primaryColor) binding.toolBar.title = getString(R.string.login_source, source.getTag()) diff --git a/app/src/main/res/layout/dialog_login.xml b/app/src/main/res/layout/dialog_login.xml index de1b241c9..e536dd096 100644 --- a/app/src/main/res/layout/dialog_login.xml +++ b/app/src/main/res/layout/dialog_login.xml @@ -1,40 +1,49 @@ - + 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:background="@color/background_menu" + android:elevation="5dp" + android:theme="?attr/actionBarStyle" + app:displayHomeAsUp="false" + app:fitStatusBar="false" + app:popupTheme="@style/AppTheme.PopupOverlay" + app:titleTextAppearance="@style/ToolbarTitle" /> + + + + - + - \ No newline at end of file + + \ No newline at end of file