Skip to content

Commit 69a2417

Browse files
ADFA-4910 feat(wizard): swap placeholder spinner for the "working" Lottie
The Maps and ZIM "Preparing" cards showed a generic indeterminate spinner as a placeholder at the top of the install band. Replace it with the real k2go working loop (cloud -> streaming dots -> logo, seamless 2s), 600:368. The animation ships without the logo, so the app composites ic_launcher_foreground over the built-in green glow via a weighted scaffold that tracks the art at any width. adjustViewBounds locks the ratio; Lottie shows a static first frame when system animations are off. Layout-only: same view ids (unused in code), no logic/string changes.
1 parent 413dcee commit 69a2417

3 files changed

Lines changed: 118 additions & 16 deletions

File tree

‎controller/app/src/main/res/layout/fragment_k2go_maps_preparing.xml‎

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,69 @@
3333
android:textAppearance="?attr/textAppearanceBodyMedium"
3434
android:textColor="@color/k2go_muted" />
3535

36-
<!-- Contained placeholder animation. A custom Lottie can replace this ProgressBar
37-
later WITHOUT touching the boot/close animation. -->
36+
<!-- ADFA-4910: real "working" Lottie (cloud -> streaming dots -> logo) in place of the
37+
placeholder spinner. The animation ships WITHOUT the logo (see SPEC); the K2Go
38+
launcher foreground is composited on top, over the built-in green glow, positioned by
39+
a weighted scaffold so it tracks the art at any width. adjustViewBounds locks the
40+
600:368 ratio; Lottie falls back to a static first frame when system animations are off. -->
3841
<FrameLayout
3942
android:layout_width="match_parent"
40-
android:layout_height="140dp"
43+
android:layout_height="wrap_content"
4144
android:layout_marginTop="16dp">
4245

43-
<ProgressBar
46+
<com.airbnb.lottie.LottieAnimationView
4447
android:id="@+id/k2go_prep_anim"
45-
style="?android:attr/progressBarStyleLarge"
46-
android:layout_width="72dp"
47-
android:layout_height="72dp"
48-
android:layout_gravity="center"
49-
android:indeterminateTint="@color/k2go_teal" />
48+
android:layout_width="match_parent"
49+
android:layout_height="wrap_content"
50+
android:adjustViewBounds="true"
51+
android:scaleType="fitCenter"
52+
app:lottie_rawRes="@raw/k2go_working_loop"
53+
app:lottie_autoPlay="true"
54+
app:lottie_loop="true" />
55+
56+
<!-- Logo overlay (fills the art rect). The weights are the knobs: vertical
57+
top/logo/bottom and horizontal left/logo/right center the logo at ~0.80W / 0.54H,
58+
sized to sit over the green glow. -->
59+
<LinearLayout
60+
android:layout_width="match_parent"
61+
android:layout_height="match_parent"
62+
android:orientation="vertical">
63+
64+
<Space
65+
android:layout_width="match_parent"
66+
android:layout_height="0dp"
67+
android:layout_weight="300" />
68+
69+
<LinearLayout
70+
android:layout_width="match_parent"
71+
android:layout_height="0dp"
72+
android:layout_weight="480"
73+
android:orientation="horizontal">
74+
75+
<Space
76+
android:layout_width="0dp"
77+
android:layout_height="match_parent"
78+
android:layout_weight="650" />
79+
80+
<ImageView
81+
android:layout_width="0dp"
82+
android:layout_height="match_parent"
83+
android:layout_weight="295"
84+
android:src="@drawable/ic_launcher_foreground"
85+
android:scaleType="fitCenter"
86+
android:contentDescription="@null" />
87+
88+
<Space
89+
android:layout_width="0dp"
90+
android:layout_height="match_parent"
91+
android:layout_weight="55" />
92+
</LinearLayout>
93+
94+
<Space
95+
android:layout_width="match_parent"
96+
android:layout_height="0dp"
97+
android:layout_weight="220" />
98+
</LinearLayout>
5099
</FrameLayout>
51100

52101
<!-- The process's own text, not an invented percentage. -->

‎controller/app/src/main/res/layout/fragment_k2go_zim_preparing.xml‎

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
boot/close Lottie) + a REAL progress bar/percent + "X of N items" + per-category checklist.
44
Mock progress until the download backend is wired. -->
55
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
6+
xmlns:app="http://schemas.android.com/apk/res-auto"
67
android:layout_width="match_parent"
78
android:layout_height="match_parent"
89
android:fillViewport="true">
@@ -31,18 +32,69 @@
3132
android:textAppearance="?attr/textAppearanceBodyMedium"
3233
android:textColor="@color/k2go_muted" />
3334

35+
<!-- ADFA-4910: real "working" Lottie (cloud -> streaming dots -> logo) in place of the
36+
placeholder spinner. The animation ships WITHOUT the logo (see SPEC); the K2Go
37+
launcher foreground is composited on top, over the built-in green glow, positioned by
38+
a weighted scaffold so it tracks the art at any width. adjustViewBounds locks the
39+
600:368 ratio; Lottie falls back to a static first frame when system animations are off. -->
3440
<FrameLayout
3541
android:layout_width="match_parent"
36-
android:layout_height="130dp"
42+
android:layout_height="wrap_content"
3743
android:layout_marginTop="12dp">
3844

39-
<ProgressBar
45+
<com.airbnb.lottie.LottieAnimationView
4046
android:id="@+id/k2go_zprep_anim"
41-
style="?android:attr/progressBarStyleLarge"
42-
android:layout_width="64dp"
43-
android:layout_height="64dp"
44-
android:layout_gravity="center"
45-
android:indeterminateTint="@color/k2go_teal" />
47+
android:layout_width="match_parent"
48+
android:layout_height="wrap_content"
49+
android:adjustViewBounds="true"
50+
android:scaleType="fitCenter"
51+
app:lottie_rawRes="@raw/k2go_working_loop"
52+
app:lottie_autoPlay="true"
53+
app:lottie_loop="true" />
54+
55+
<!-- Logo overlay (fills the art rect). The weights are the knobs: vertical
56+
top/logo/bottom and horizontal left/logo/right center the logo at ~0.80W / 0.54H,
57+
sized to sit over the green glow. -->
58+
<LinearLayout
59+
android:layout_width="match_parent"
60+
android:layout_height="match_parent"
61+
android:orientation="vertical">
62+
63+
<Space
64+
android:layout_width="match_parent"
65+
android:layout_height="0dp"
66+
android:layout_weight="300" />
67+
68+
<LinearLayout
69+
android:layout_width="match_parent"
70+
android:layout_height="0dp"
71+
android:layout_weight="480"
72+
android:orientation="horizontal">
73+
74+
<Space
75+
android:layout_width="0dp"
76+
android:layout_height="match_parent"
77+
android:layout_weight="650" />
78+
79+
<ImageView
80+
android:layout_width="0dp"
81+
android:layout_height="match_parent"
82+
android:layout_weight="295"
83+
android:src="@drawable/ic_launcher_foreground"
84+
android:scaleType="fitCenter"
85+
android:contentDescription="@null" />
86+
87+
<Space
88+
android:layout_width="0dp"
89+
android:layout_height="match_parent"
90+
android:layout_weight="55" />
91+
</LinearLayout>
92+
93+
<Space
94+
android:layout_width="match_parent"
95+
android:layout_height="0dp"
96+
android:layout_weight="220" />
97+
</LinearLayout>
4698
</FrameLayout>
4799

48100
<LinearLayout

0 commit comments

Comments
 (0)