Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

fix(android): show the first-run setup screens again; they opened blank with only the Continue button

wquguruc5acd7da6c12
diff --git a/android/app/src/main/kotlin/com/wquguru/cicada/OnboardingActivity.kt b/android/app/src/main/kotlin/com/wquguru/cicada/OnboardingActivity.kt
index 24ff838..84002b2 100644
--- a/android/app/src/main/kotlin/com/wquguru/cicada/OnboardingActivity.kt
+++ b/android/app/src/main/kotlin/com/wquguru/cicada/OnboardingActivity.kt
@@ -122,9 +122,11 @@ class OnboardingActivity : Activity() {
val root = ui.screen(this, null, back = false, ground = Palette.ground, body = content, bottom = bottom)
window.navigationBarColor = Palette.ground
bottom.setBackgroundColor(Palette.ground)
- // The screen's own bar is replaced by the progress bar.
- root.removeViewAt(0)
- root.addView(topBar, 0)
+ // The screen's own bar is replaced by the progress bar. The bar is the first child of the
+ // column inside the root (the root's other child is the floating bottom), not of the root.
+ val column = root.getChildAt(0) as LinearLayout
+ column.removeViewAt(0)
+ column.addView(topBar, 0)
return root
}