Skip to content

Commit 8e544df

Browse files
graycreateclaude
andcommitted
fix: improve dark mode loading by setting WebView invisible in XML and increasing delay
- Set WebView visibility to invisible in XML layout to prevent initial white flash - Increase delay from 100ms to 300ms to ensure theme JavaScript executes properly - This eliminates the white screen gap during page load in dark mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9e20366 commit 8e544df

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/src/main/java/me/ghui/v2er/module/vshare/VshareWebActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public void run() {
188188
mWebView.setVisibility(View.VISIBLE);
189189
hideLoading();
190190
}
191-
}, 100);
191+
}, 300);
192192
}
193193
});
194194
}

app/src/main/res/layout/activity_vshare_web.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<WebView
88
android:id="@+id/webview"
9+
android:visibility="invisible"
910
android:layout_width="match_parent"
1011
android:layout_height="match_parent" />
1112

0 commit comments

Comments
 (0)