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. 67
      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,40 +1,49 @@
<?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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:background="@color/background" android:padding="16dp">
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar <LinearLayout
android:id="@+id/tool_bar" 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_menu" android:layout_gravity="center"
android:elevation="5dp" android:background="@drawable/shape_card_view"
android:theme="?attr/actionBarStyle" android:orientation="vertical"
app:displayHomeAsUp="false" tools:ignore="UselessParent">
app:fitStatusBar="false"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:titleTextAppearance="@style/ToolbarTitle" />
<androidx.core.widget.NestedScrollView <androidx.appcompat.widget.Toolbar
android:layout_width="match_parent" android:id="@+id/tool_bar"
android:layout_height="wrap_content">
<com.google.android.flexbox.FlexboxLayout
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:clipToPadding="false" android:background="@color/background_menu"
android:padding="3dp" android:elevation="5dp"
android:layout_marginTop="8dp" android:theme="?attr/actionBarStyle"
app:dividerDrawable="@drawable/shape_space_divider" app:displayHomeAsUp="false"
app:flexDirection="row" app:fitStatusBar="false"
app:flexWrap="wrap" app:popupTheme="@style/AppTheme.PopupOverlay"
app:showDivider="middle" /> app:titleTextAppearance="@style/ToolbarTitle" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/flexbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:clipToPadding="false"
android:padding="3dp"
app:dividerDrawable="@drawable/shape_space_divider"
app:flexDirection="row"
app:flexWrap="wrap"
app:showDivider="middle" />
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</LinearLayout> </LinearLayout>
</FrameLayout>
Loading…
Cancel
Save