|
|
@ -4,10 +4,7 @@ import android.annotation.SuppressLint |
|
|
|
import android.content.DialogInterface |
|
|
|
import android.content.DialogInterface |
|
|
|
import android.os.Bundle |
|
|
|
import android.os.Bundle |
|
|
|
import android.util.DisplayMetrics |
|
|
|
import android.util.DisplayMetrics |
|
|
|
import android.view.Gravity |
|
|
|
import android.view.* |
|
|
|
import android.view.LayoutInflater |
|
|
|
|
|
|
|
import android.view.View |
|
|
|
|
|
|
|
import android.view.ViewGroup |
|
|
|
|
|
|
|
import androidx.core.view.get |
|
|
|
import androidx.core.view.get |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.base.BaseDialogFragment |
|
|
|
import io.legado.app.base.BaseDialogFragment |
|
|
@ -20,7 +17,6 @@ import io.legado.app.lib.theme.accentColor |
|
|
|
import io.legado.app.lib.theme.bottomBackground |
|
|
|
import io.legado.app.lib.theme.bottomBackground |
|
|
|
import io.legado.app.lib.theme.getPrimaryTextColor |
|
|
|
import io.legado.app.lib.theme.getPrimaryTextColor |
|
|
|
import io.legado.app.lib.theme.primaryColor |
|
|
|
import io.legado.app.lib.theme.primaryColor |
|
|
|
import io.legado.app.ui.book.read.Help |
|
|
|
|
|
|
|
import io.legado.app.ui.book.read.ReadBookActivity |
|
|
|
import io.legado.app.ui.book.read.ReadBookActivity |
|
|
|
import io.legado.app.ui.widget.font.FontSelectDialog |
|
|
|
import io.legado.app.ui.widget.font.FontSelectDialog |
|
|
|
import io.legado.app.utils.* |
|
|
|
import io.legado.app.utils.* |
|
|
@ -42,7 +38,7 @@ class ReadStyleDialog : BaseDialogFragment(), FontSelectDialog.CallBack { |
|
|
|
it.windowManager?.defaultDisplay?.getMetrics(dm) |
|
|
|
it.windowManager?.defaultDisplay?.getMetrics(dm) |
|
|
|
} |
|
|
|
} |
|
|
|
dialog?.window?.let { |
|
|
|
dialog?.window?.let { |
|
|
|
Help.upSystemUiVisibility(it) |
|
|
|
it.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND) |
|
|
|
it.setBackgroundDrawableResource(R.color.background) |
|
|
|
it.setBackgroundDrawableResource(R.color.background) |
|
|
|
it.decorView.setPadding(0, 0, 0, 0) |
|
|
|
it.decorView.setPadding(0, 0, 0, 0) |
|
|
|
val attr = it.attributes |
|
|
|
val attr = it.attributes |
|
|
|