Transparent background for WebView in Changelog
This commit is contained in:
parent
02f076de57
commit
f55c7ac21c
2 changed files with 4 additions and 5 deletions
|
@ -53,9 +53,7 @@ class WhatsNewFragment : BottomSheetDialogFragment() {
|
||||||
// Inject color values for WebView body background and links
|
// Inject color values for WebView body background and links
|
||||||
val isDark = isWindowBackgroundDark(requireContext())
|
val isDark = isWindowBackgroundDark(requireContext())
|
||||||
val accentColor = accentColor()
|
val accentColor = accentColor()
|
||||||
val backgroundColor = colorToCSS(
|
binding.webView.setBackgroundColor(0)
|
||||||
surfaceColor(Color.parseColor(if (isDark) "#424242" else "#ffffff"))
|
|
||||||
)
|
|
||||||
val contentColor = colorToCSS(Color.parseColor(if (isDark) "#ffffff" else "#000000"))
|
val contentColor = colorToCSS(Color.parseColor(if (isDark) "#ffffff" else "#000000"))
|
||||||
val textColor = colorToCSS(Color.parseColor(if (isDark) "#60FFFFFF" else "#80000000"))
|
val textColor = colorToCSS(Color.parseColor(if (isDark) "#60FFFFFF" else "#80000000"))
|
||||||
val accentColorString = colorToCSS(accentColor())
|
val accentColorString = colorToCSS(accentColor())
|
||||||
|
@ -69,7 +67,7 @@ class WhatsNewFragment : BottomSheetDialogFragment() {
|
||||||
val changeLog = buf.toString()
|
val changeLog = buf.toString()
|
||||||
.replace(
|
.replace(
|
||||||
"{style-placeholder}",
|
"{style-placeholder}",
|
||||||
"body { background-color: $backgroundColor; color: $contentColor; } li {color: $textColor;} h3 {color: $accentColorString;} .tag {background-color: $accentColorString; color: $accentTextColor; } div{background-color: $cardBackgroundColor;}"
|
"body { color: $contentColor; } li {color: $textColor;} h3 {color: $accentColorString;} .tag {background-color: $accentColorString; color: $accentTextColor; } div{background-color: $cardBackgroundColor;}"
|
||||||
)
|
)
|
||||||
.replace("{link-color}", colorToCSS(accentColor()))
|
.replace("{link-color}", colorToCSS(accentColor()))
|
||||||
.replace(
|
.replace(
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true"
|
||||||
|
android:paddingTop="8dp">
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue