pull/2282/head
kunfei 2 years ago
parent 2fa7b5e17c
commit 0d9bf328e9
  1. 3
      app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt
  2. 21
      app/src/main/res/layout/dialog_login.xml

@ -34,9 +34,12 @@ class SourceLoginDialog : BaseDialogFragment(R.layout.dialog_login) {
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()
setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT) setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
dialog?.window?.setBackgroundDrawableResource(R.color.transparent)
} }
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
view.setBackgroundResource(R.color.transparent)
view.setOnClickListener { dismiss() }
val source = viewModel.source ?: return val source = viewModel.source ?: return
binding.toolBar.setBackgroundColor(primaryColor) binding.toolBar.setBackgroundColor(primaryColor)
binding.toolBar.title = getString(R.string.login_source, source.getTag()) binding.toolBar.title = getString(R.string.login_source, source.getTag())

@ -1,11 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<LinearLayout
android:id="@+id/vw_bg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/background" android:layout_gravity="center"
android:gravity="center" android:background="@drawable/shape_card_view"
android:orientation="vertical"> android:orientation="vertical"
tools:ignore="UselessParent">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/tool_bar" android:id="@+id/tool_bar"
@ -27,9 +35,9 @@
android:id="@+id/flexbox" android:id="@+id/flexbox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:clipToPadding="false" android:clipToPadding="false"
android:padding="3dp" android:padding="3dp"
android:layout_marginTop="8dp"
app:dividerDrawable="@drawable/shape_space_divider" app:dividerDrawable="@drawable/shape_space_divider"
app:flexDirection="row" app:flexDirection="row"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -37,4 +45,5 @@
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</LinearLayout> </LinearLayout>
</FrameLayout>
Loading…
Cancel
Save