@@ -70,9 +70,11 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
7070 String sizeText = (sizeRes != 0 ) ? getString (sizeRes )
7171 : (bytes >= 0 ) ? "\u2248 " + org .appdevforall .k2go .util .ByteFormatter .toHuman (bytes )
7272 : "\u2248 NA" ;
73- chips .addView (K2GoChip .create (requireContext (), sizeText , R .color .k2go_teal ));
73+ // K2GO-385 (PR3): size / version are neutral metadata tags (colour is noise); "Runs offline" is a
74+ // leaf trait (a capability that carries valence). The lifecycle status below is a dot+text badge.
75+ chips .addView (K2GoChip .create (requireContext (), sizeText ));
7476 String ver = ModuleCards .version (c .key ());
75- if (ver != null ) chips .addView (K2GoChip .create (requireContext (), "v" + ver , R . color . k2go_teal ));
77+ if (ver != null ) chips .addView (K2GoChip .create (requireContext (), "v" + ver ));
7678 chips .addView (K2GoChip .create (requireContext (), getString (R .string .k2go_mod_runs_offline ), R .color .k2go_leaf ));
7779 if (ModuleCards .isDemo (c .key ())) chips .addView (K2GoChip .create (requireContext (), getString (R .string .k2go_mod_demo ), R .color .k2go_amber_text )); // ADFA-4958
7880
@@ -97,7 +99,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
9799 // than start visible, because showing them and then taking them away is how a user ends
98100 // up tapping one in the gap.
99101 final Button installNowBtn = root .findViewById (R .id .k2go_moddet_install_now );
100- final ViewGroup chipRow = chips ;
102+ final ViewGroup statusRow = root . findViewById ( R . id . k2go_moddet_status ) ;
101103 installNowBtn .setVisibility (View .GONE );
102104
103105 Button schedule = root .findViewById (R .id .k2go_moddet_schedule );
@@ -123,7 +125,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
123125 if (!isAdded ()) return ;
124126 if (verdict == org .appdevforall .k2go .system .domain .SystemVerdict .State .NO_SYSTEM
125127 || verdict == org .appdevforall .k2go .system .domain .SystemVerdict .State .DAMAGED ) {
126- chipRow . addView ( K2GoChip .create (requireContext (), getString (R .string .k2go_state_no_system ), R .color .k2go_amber_text ));
128+ addStatus ( statusRow , K2GoStatusBadge .create (requireContext (), getString (R .string .k2go_state_no_system ), R .color .k2go_amber_text ));
127129 installNowBtn .setText (R .string .k2go_home_recover );
128130 installNowBtn .setOnClickListener (v -> SetupLibraryActivity .recover (requireContext ()));
129131 installNowBtn .setVisibility (View .VISIBLE );
@@ -134,11 +136,11 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
134136 || verdict == org .appdevforall .k2go .system .domain .SystemVerdict .State .CLONE_SHARING ) {
135137 // ADFA-5312: a system op is in progress — the system is present but mid-setup and the
136138 // server is down. Don't offer Install or Recover into it; just say it's busy.
137- chipRow . addView ( K2GoChip .create (requireContext (), getString (R .string .k2go_home_installing ), R .color .k2go_amber_text ));
139+ addStatus ( statusRow , K2GoStatusBadge .create (requireContext (), getString (R .string .k2go_home_installing ), R .color .k2go_amber_text ));
138140 return ;
139141 }
140142 if (isInstalled ) {
141- chipRow . addView ( K2GoChip .create (requireContext (), getString (R .string .k2go_mod_phase_done ), R .color .k2go_leaf ));
143+ addStatus ( statusRow , K2GoStatusBadge .create (requireContext (), getString (R .string .k2go_mod_phase_done ), R .color .k2go_leaf ));
142144 return ; // nothing to offer: a module cannot be uninstalled or reinstalled here
143145 }
144146 // ADFA-4898: this module's runrole failed in the last finished batch — the SAME per-module
@@ -151,7 +153,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
151153 // Retry then bounces to the hub, which observes the queue live; this detail is a one-shot
152154 // snapshot (no observer) and would otherwise sit on a stale "Couldn't install".
153155 if (org .appdevforall .k2go .install .presentation .ModuleQueueRepository .get ().current ().didFail (c .key ())) {
154- chipRow . addView ( K2GoChip .create (requireContext (), getString (R .string .k2go_mod_phase_failed ), R .color .k2go_clay ));
156+ addStatus ( statusRow , K2GoStatusBadge .create (requireContext (), getString (R .string .k2go_mod_phase_failed ), R .color .k2go_clay ));
155157 schedule .setText (R .string .k2go_home_retry );
156158 // Shared, busy-gated retry (same action the live progress card fires). On a real start,
157159 // land on the install index — the same destination as a normal install (openModuleIndex)
@@ -170,7 +172,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
170172 return ;
171173 }
172174 if (unknown ) {
173- chipRow . addView ( K2GoChip .create (requireContext (), getString (R .string .k2go_state_no_answer ),
175+ addStatus ( statusRow , K2GoStatusBadge .create (requireContext (), getString (R .string .k2go_state_no_answer ),
174176 R .color .k2go_amber_text ));
175177 return ; // no grounds to offer work either way
176178 }
@@ -206,4 +208,11 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
206208 return root ;
207209 }
208210
211+ /** K2GO-385 (PR3): a lifecycle status badge goes on its own row (k2go_moddet_status), which stays
212+ * GONE until one is added -- so a dot+text status never shares the boxed-metadata chip row. */
213+ private static void addStatus (ViewGroup row , View badge ) {
214+ row .setVisibility (View .VISIBLE );
215+ row .addView (badge );
216+ }
217+
209218}
0 commit comments