diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDiolog.kt b/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDiolog.kt new file mode 100644 index 000000000..89feb7a7b --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDiolog.kt @@ -0,0 +1,43 @@ +package io.legado.app.ui.readbook.config + +import android.os.Bundle +import android.util.DisplayMetrics +import android.view.Gravity +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.DialogFragment +import io.legado.app.R +import io.legado.app.ui.readbook.Help + +class BgTextConfigDiolog : DialogFragment() { + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + return super.onCreateView(inflater, container, savedInstanceState) + } + + override fun onStart() { + super.onStart() + val dm = DisplayMetrics() + activity?.windowManager?.defaultDisplay?.getMetrics(dm) + dialog?.window?.let { + it.setBackgroundDrawableResource(R.color.transparent) + it.decorView.setPadding(0, 0, 0, 0) + val attr = it.attributes + attr.dimAmount = 0.0f + attr.gravity = Gravity.BOTTOM + it.attributes = attr + it.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) + Help.upSystemUiVisibility(it) + } + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } + +} \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_read_bg_text.xml b/app/src/main/res/layout/dialog_read_bg_text.xml new file mode 100644 index 000000000..1faa34fc2 --- /dev/null +++ b/app/src/main/res/layout/dialog_read_bg_text.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 861a4bb0a..79e0f93f1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -218,7 +218,7 @@ 无最新章节信息 显示时间和电量 显示分隔线 - 深色状态栏图标 + 深色状态栏图标 内容 拷贝内容 一键缓存