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() {
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())

@ -1,40 +1,49 @@
<?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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/background"
android:gravity="center"
android:orientation="vertical">
android:layout_height="match_parent"
android:padding="16dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/tool_bar"
<LinearLayout
android:id="@+id/vw_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
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" />
android:layout_gravity="center"
android:background="@drawable/shape_card_view"
android:orientation="vertical"
tools:ignore="UselessParent">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/flexbox"
<androidx.appcompat.widget.Toolbar
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:padding="3dp"
android:layout_marginTop="8dp"
app:dividerDrawable="@drawable/shape_space_divider"
app:flexDirection="row"
app:flexWrap="wrap"
app:showDivider="middle" />
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" />
<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