Skip to content

Commit 5f5e168

Browse files
MHShettythestinger
authored andcommitted
Add dark app theme support
1 parent f91ba52 commit 5f5e168

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java

+1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ protected void onCreate(Bundle savedInstanceState) {
158158
setContentView(R.layout.webview);
159159

160160
mWebView = findViewById(R.id.webview);
161+
mWebView.setBackgroundColor(Color.TRANSPARENT);
161162

162163
if (BuildConfig.DEBUG) {
163164
WebView.setWebContentsDebuggingEnabled(true);
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="android:windowBackground">#000000</item>
7+
</style>
8+
9+
</resources>

app/src/main/res/values/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
22

33
<!-- Base application theme. -->
4-
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
4+
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
55
<!-- Customize your theme here. -->
66
</style>
77

0 commit comments

Comments
 (0)