pull/32/head
parent
b1187f0463
commit
cd11ae9580
@ -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) |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:orientation="vertical" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent"> |
||||||
|
|
||||||
|
<io.legado.app.lib.theme.view.ATESwitch |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:text="@string/dark_status_icon" /> |
||||||
|
|
||||||
|
</LinearLayout> |
Loading…
Reference in new issue