From e7464caa82fb5747f2d8b50aa1a0cb114de48b31 Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Sat, 15 Aug 2026 03:34:39 -0600 Subject: [PATCH 1/7] ADFA-5154 refactor(ui): shared view_k2go_qr_section for the stacked-QR sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stacked "scan this" section — teal badge + title, QR on a Paper card (with a placeholder), caption/subcaption, and the reveal-on-tap fallback — as a reusable , bound by the shared QrSection holder (ADFA-5157). Generic sec_* ids so a page can include it more than once. Deferred from 5157 until both shapes were concrete; Connect's two-section page and Clone Page 1 (Join + Get app) now consume it. --- .../main/res/layout/view_k2go_qr_section.xml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 controller/app/src/main/res/layout/view_k2go_qr_section.xml diff --git a/controller/app/src/main/res/layout/view_k2go_qr_section.xml b/controller/app/src/main/res/layout/view_k2go_qr_section.xml new file mode 100644 index 000000000..0cbe7657b --- /dev/null +++ b/controller/app/src/main/res/layout/view_k2go_qr_section.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + From 2d7412ab20eab3164bbf3609d9b66009ad1474fe Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Sat, 15 Aug 2026 04:32:36 -0600 Subject: [PATCH 2/7] ADFA-5154 feat(clone): 2-page Send (Join + Get app, then Copy) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collapse the Send wizard into two pages, matching the Connect stacked-QR pattern. Page 1 (Prepare) stacks two QrSection cards — ① Join the network and ② Get the app — both live at once; Page 2 (Copy) starts the daemon and shows the transfer QR. One gate ("Installed? Copy the library" / "Back to step 1") replaces the old 3-step stage machine. Removes the stage/sendApp state and the separate "Send the app" sub-screen (the APK QR is inline on Page 1 now); the daemon/transfer logic in renderStartState is unchanged. The deep app view, skip-app and send-app entry are left GONE for a follow-up cleanup once the flow is validated. --- .../controller/redesign/CloneFragment.java | 342 ++++++++---------- .../main/res/layout/fragment_k2go_clone.xml | 251 ++++++------- .../app/src/main/res/values/strings_k2go.xml | 3 + 3 files changed, 285 insertions(+), 311 deletions(-) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java index 45e94aabd..995d8bf48 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java @@ -62,13 +62,15 @@ public class CloneFragment extends Fragment { private enum Side { SEND, RECEIVE } private enum Mode { HOTSPOT, WIFI } - private enum Stage { JOIN, START } + // ADFA-5154: the 3-step Send wizard (Join / Get app / Copy) becomes 2 pages. PREPARE shows Join ① + // and Get app ② stacked (both QRs at once); COPY shows the transfer QR. The "Installed? Copy the + // library ›" gate advances PREPARE -> COPY (a real prerequisite: the app must be on the other phone). + private enum Page { PREPARE, COPY } private Side side = Side.SEND; private Mode mode = Mode.HOTSPOT; - private Stage stage = Stage.JOIN; + private Page page = Page.PREPARE; private boolean startedStep = false; - private boolean fallbackOpen = false; // ADFA-4815: step-1 scan fallback hidden until tapped private final LocalHotspotManager hs = LocalHotspotManager.get(); private TransportEngine transport; @@ -90,12 +92,10 @@ private enum Stage { JOIN, START } // backgrounds the app (the copy keeps running under CloneShareService; the notification returns). private androidx.activity.OnBackPressedCallback receiveBackGate; private boolean leaveWarned = false; - // ADFA-4785: "Send the app" sub-screen (bootstrap a phone with no K2Go) — serves the APK over HTTP. - private boolean sendApp = false; + // ADFA-5154: the APK is served over HTTP from the Get-app section on Page 1 (was a sub-screen). private ApkServer apkServer; private String apkFileName; - private LinearLayout sendAppEntry, sendAppView; - private ImageView sendAppQr; + private LinearLayout sendAppEntry, sendAppView; // ADFA-5154: vestigial deep view, kept GONE private ActivityResultLauncher locationPerm; @@ -104,8 +104,11 @@ private enum Stage { JOIN, START } private boolean atFork = true; private LinearLayout forkBox, tabsRow; private TextView cloneHdr, subtitleView, backHeader; - private boolean getAppSkipped = false, getAppDone = false; // ADFA-4785: step-2 (Get app) disposition - private TextView stepTitle, skipApp, shareWifi, fallbackToggle; + private TextView stepTitle, skipApp, shareWifi; + // ADFA-5154: Page 1 stacks two shared QR sections (Join ① + Get app ②); Page 2 is Copy. + private QrSection secJoin, secGetApp; + private TextView secJoinBadge, secJoinTitle; // Join title is mode-dependent; not part of QrSection + private LinearLayout page1, page2, hint, getAppBanner; // Receive side private SyncStateViewModel syncVm; private LinearLayout receiveBox, progressBox; @@ -130,7 +133,7 @@ private enum RStage { JOIN, START } private TextView incompatWhy, incompatWhyText, incompatTech, incompatTechText, incompatBack; private int incompatHostBits = -1; private boolean incompatWhyOpen = false, incompatTechOpen = false; - private LinearLayout netRow, steps, fallback, fallbackValues; + private LinearLayout netRow, steps; private ImageView qr; private TextView showcode, codetext, copyBtn, shareBtn; private LinearLayout codeblock; @@ -159,9 +162,25 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c qr = v.findViewById(R.id.k2go_clone_qr); caption = v.findViewById(R.id.k2go_clone_caption); subCaption = v.findViewById(R.id.k2go_clone_subcaption); - fallback = v.findViewById(R.id.k2go_clone_fallback); - fallbackToggle = v.findViewById(R.id.k2go_clone_fallback_toggle); - fallbackValues = v.findViewById(R.id.k2go_clone_fallback_values); + // ADFA-5154: the two stacked sections (Page 1) + the page containers. Sections bind through the + // include root + the shared sec_* ids (ADFA-5157). + page1 = v.findViewById(R.id.k2go_clone_page1); + page2 = v.findViewById(R.id.k2go_clone_page2); + hint = v.findViewById(R.id.k2go_clone_hint); + getAppBanner = v.findViewById(R.id.k2go_clone_getapp_banner); + View joinRoot = v.findViewById(R.id.k2go_clone_sec_join); + View getAppRoot = v.findViewById(R.id.k2go_clone_sec_getapp); + secJoin = new QrSection(joinRoot, R.id.sec_qr_frame, R.id.sec_qr, R.id.sec_qr_ph, + R.id.sec_caption, R.id.sec_subcaption, R.id.sec_fallback_toggle, R.id.sec_fallback, R.id.sec_fallback_values); + secGetApp = new QrSection(getAppRoot, R.id.sec_qr_frame, R.id.sec_qr, R.id.sec_qr_ph, + R.id.sec_caption, R.id.sec_subcaption, R.id.sec_fallback_toggle, R.id.sec_fallback, R.id.sec_fallback_values); + // ADFA-5154: badge numbers are static; the Get-app title is static; the Join title is mode- + // dependent (set in renderPrepare). The include's sec_badge/sec_title aren't part of QrSection. + secJoinBadge = joinRoot.findViewById(R.id.sec_badge); + secJoinTitle = joinRoot.findViewById(R.id.sec_title); + secJoinBadge.setText("1"); + ((TextView) getAppRoot.findViewById(R.id.sec_badge)).setText("2"); + ((TextView) getAppRoot.findViewById(R.id.sec_title)).setText(getString(R.string.k2go_badge_getapp)); advance = v.findViewById(R.id.k2go_clone_advance); stop = v.findViewById(R.id.k2go_clone_stop); footer = v.findViewById(R.id.k2go_clone_footer); @@ -226,12 +245,10 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c codetext = v.findViewById(R.id.k2go_clone_codetext); copyBtn = v.findViewById(R.id.k2go_clone_copy); shareBtn = v.findViewById(R.id.k2go_clone_share); - sendAppEntry = v.findViewById(R.id.k2go_sendapp_entry); + sendAppEntry = v.findViewById(R.id.k2go_sendapp_entry); // ADFA-5154: vestigial (deep view), kept GONE sendAppView = v.findViewById(R.id.k2go_sendapp_view); - sendAppQr = v.findViewById(R.id.k2go_sendapp_qr); - sendAppEntry.setOnClickListener(x -> { sendApp = true; render(); }); - v.findViewById(R.id.k2go_sendapp_back).setOnClickListener(x -> exitSendApp()); - v.findViewById(R.id.k2go_sendapp_next).setOnClickListener(x -> getAppDoneNext()); + // ADFA-5154: the Get-app QR now lives inline on Page 1 (secGetApp); "Can't scan? Share another way" + // hands the installed APK to the Android share sheet. v.findViewById(R.id.k2go_sendapp_share).setOnClickListener(x -> shareApkViaSheet()); syncVm = new ViewModelProvider(requireActivity()).get(SyncStateViewModel.class); @@ -243,9 +260,10 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c tabHotspot.setOnClickListener(x -> requestMode(Mode.HOTSPOT)); tabWifi.setOnClickListener(x -> requestMode(Mode.WIFI)); advance.setOnClickListener(x -> { - fallbackOpen = false; // ADFA-4815: collapse the step-1 fallback when changing step - if (stage == Stage.JOIN) { sendApp = true; render(); } // step 1 -> step 2 (Get app) - else { stage = Stage.JOIN; getAppDone = false; render(); } // step 3 -> back to step 1 + // ADFA-5154: the one gate. PREPARE (Join + Get app) -> COPY when the app is installed on the + // other phone; COPY -> back to PREPARE. + page = (page == Page.PREPARE) ? Page.COPY : Page.PREPARE; + render(); }); showcode.setOnClickListener(x -> { codeExpanded = !codeExpanded; @@ -286,8 +304,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c forkBox = v.findViewById(R.id.k2go_clone_fork); tabsRow = v.findViewById(R.id.k2go_clone_tabs); stepTitle = v.findViewById(R.id.k2go_clone_steptitle); - skipApp = v.findViewById(R.id.k2go_clone_skipapp); - skipApp.setOnClickListener(x -> { getAppSkipped = true; stage = Stage.START; render(); }); + skipApp = v.findViewById(R.id.k2go_clone_skipapp); // ADFA-5154: vestigial, kept GONE shareWifi = v.findViewById(R.id.k2go_clone_sharewifi); shareWifi.setOnClickListener(x -> openWifiSettings()); v.findViewById(R.id.k2go_clone_fork_send).setOnClickListener(x -> enterSide(Side.SEND)); @@ -314,7 +331,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c // fork. Restore the state the share screen redraws from; daemonStarted=true makes ensureDaemon's // guard skip a re-start. if (CloneSendSession.isActive()) { - atFork = false; side = Side.SEND; sendApp = false; stage = Stage.START; + atFork = false; side = Side.SEND; page = Page.COPY; mode = CloneSendSession.isHotspot() ? Mode.HOTSPOT : Mode.WIFI; tempPass = CloneSendSession.tempPass(); hostHasRootfs = CloneSendSession.hostHasRootfs(); @@ -345,7 +362,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c return v; } - private void enterSide(Side sd) { atFork = false; getAppSkipped = false; getAppDone = false; sendApp = false; setSide(sd); } + private void enterSide(Side sd) { atFork = false; page = Page.PREPARE; setSide(sd); } private void goToFork() { atFork = true; render(); } @@ -359,7 +376,7 @@ private void setSide(Side sd) { // to serve. (This also covers "send the app" buried under Send — a deliberate simplification; // a phone with a system is the natural source for both the app and the system.) systemPresent = org.iiab.controller.SystemStateEvaluator.isSystemInstalled(requireContext()); - stage = Stage.JOIN; + page = Page.PREPARE; if (systemPresent) setMode(Mode.HOTSPOT); else render(); // ADFA-4785: enter Send at step 1 return; } @@ -371,7 +388,7 @@ private void setSide(Side sd) { // ADFA-4785: switching the network at step 3 (Copy) drops the active connection and cuts any // copy in progress. Warn first; elsewhere (or when the mode is unchanged) switch directly. private void requestMode(Mode target) { - boolean sharing = (side == Side.SEND && !sendApp && stage == Stage.START && daemonStarted); + boolean sharing = (side == Side.SEND && page == Page.COPY && daemonStarted); if (target == mode || !sharing) { setMode(target); return; } String label = (target == Mode.HOTSPOT) ? "Hotspot" : "Wi-Fi"; new MaterialAlertDialogBuilder(requireContext()) @@ -384,7 +401,7 @@ private void requestMode(Mode target) { private void setMode(Mode m) { mode = m; - fallbackOpen = false; // ADFA-4815: each mode starts with the step-1 fallback collapsed + if (secJoin != null) secJoin.fbOpen = false; // ADFA-4815: each mode starts with ①'s fallback collapsed if (m == Mode.HOTSPOT) ensureHotspot(); render(); // ADFA-4785: keep the current step; switching Hotspot/Wi-Fi no longer resets to step 1 } @@ -532,11 +549,8 @@ private void render() { backHeader.setVisibility(View.GONE); netRow.setVisibility(View.GONE); steps.setVisibility(View.GONE); - qr.setVisibility(View.GONE); - caption.setVisibility(View.GONE); - subCaption.setVisibility(View.GONE); - fallback.setVisibility(View.GONE); - fallbackToggle.setVisibility(View.GONE); + page1.setVisibility(View.GONE); + page2.setVisibility(View.GONE); advance.setVisibility(View.GONE); stop.setVisibility(View.GONE); footer.setVisibility(View.GONE); @@ -556,11 +570,8 @@ private void render() { if (side == Side.RECEIVE) { netRow.setVisibility(View.GONE); steps.setVisibility(View.GONE); - qr.setVisibility(View.GONE); - caption.setVisibility(View.GONE); - subCaption.setVisibility(View.GONE); - fallback.setVisibility(View.GONE); - fallbackToggle.setVisibility(View.GONE); + page1.setVisibility(View.GONE); + page2.setVisibility(View.GONE); advance.setVisibility(View.GONE); stop.setVisibility(View.GONE); footer.setVisibility(View.GONE); @@ -577,32 +588,28 @@ private void render() { renderNoSystemSend(); return; } - if (sendApp) { // ADFA-4785: step 2 (Get app) — spine + step title + network selector, then the sub-view - netRow.setVisibility(View.VISIBLE); qr.setVisibility(View.GONE); - paintTab(tabHotspot, mode == Mode.HOTSPOT); - paintTab(tabWifi, mode == Mode.WIFI); - caption.setVisibility(View.GONE); subCaption.setVisibility(View.GONE); footer.setVisibility(View.GONE); - fallbackToggle.setVisibility(View.GONE); fallback.setVisibility(View.GONE); advance.setVisibility(View.GONE); stop.setVisibility(View.GONE); - shareCard.setVisibility(View.GONE); sendAppEntry.setVisibility(View.GONE); - steps.setVisibility(View.VISIBLE); buildSteps(true); - stepTitle.setVisibility(View.VISIBLE); stepTitle.setText(getString(R.string.k2go_clone_step2_title)); - sendAppView.setVisibility(View.VISIBLE); - renderSendApp(); - return; - } + // ADFA-5154: Send is two pages. Common chrome, then the page. sendAppView.setVisibility(View.GONE); - sendAppEntry.setVisibility(View.GONE); // renderHotspot's JOIN stage re-shows it + sendAppEntry.setVisibility(View.GONE); netRow.setVisibility(View.VISIBLE); - qr.setVisibility(View.VISIBLE); - caption.setVisibility(View.VISIBLE); - subCaption.setVisibility(View.VISIBLE); - footer.setVisibility(View.VISIBLE); // RECEIVE hid it; restore for SEND - stop.setVisibility(View.GONE); - shareCard.setVisibility(View.GONE); paintTab(tabHotspot, mode == Mode.HOTSPOT); paintTab(tabWifi, mode == Mode.WIFI); - - if (mode == Mode.HOTSPOT) renderHotspot(); else renderWifi(); + steps.setVisibility(View.VISIBLE); + buildSteps(); + advance.setVisibility(View.VISIBLE); + if (page == Page.PREPARE) { + page1.setVisibility(View.VISIBLE); + page2.setVisibility(View.GONE); + advance.setText(getString(R.string.k2go_clone_installed_copy)); + styleAdvance(true); + renderPrepare(); + } else { + page1.setVisibility(View.GONE); + page2.setVisibility(View.VISIBLE); + advance.setText(getString(R.string.k2go_clone_back_step1)); + styleAdvance(false); + renderCopy(); + } syncProtection(); } @@ -615,6 +622,9 @@ private void render() { private void renderNoSystemSend() { netRow.setVisibility(View.GONE); steps.setVisibility(View.GONE); + // The empty state draws into Page 2's QR/caption slot, so show that container (and hide Page 1). + page1.setVisibility(View.GONE); + page2.setVisibility(View.VISIBLE); if (stepTitle != null) stepTitle.setVisibility(View.GONE); // Keep the QR placeholder box visible (null bitmap shows its card background), exactly as // Connect's no-system state does — this is what makes the two screens read the same instead of @@ -623,7 +633,7 @@ private void renderNoSystemSend() { caption.setVisibility(View.VISIBLE); caption.setText(getString(R.string.k2go_connect_no_system)); subCaption.setVisibility(View.GONE); - setFallback(null); fallbackToggle.setVisibility(View.GONE); + showcode.setVisibility(View.GONE); codeblock.setVisibility(View.GONE); shareCard.setVisibility(View.GONE); sendAppEntry.setVisibility(View.GONE); sendAppView.setVisibility(View.GONE); advance.setVisibility(View.GONE); @@ -635,69 +645,86 @@ private void renderNoSystemSend() { footer.setVisibility(View.GONE); } - private void renderHotspot() { - LocalHotspotManager.State st = hs.state().getValue(); - LocalHotspotManager.Phase phase = (st != null) ? st.phase : LocalHotspotManager.Phase.OFF; - if (!LocalHotspotManager.isSupported()) { simpleState(getString(R.string.k2go_connect_hotspot_unsupported), getString(R.string.k2go_connect_try_wifi)); return; } - if (phase == LocalHotspotManager.Phase.OFF || phase == LocalHotspotManager.Phase.STARTING) { simpleState(getString(R.string.k2go_connect_starting_hotspot), ""); return; } - if (phase == LocalHotspotManager.Phase.FAILED) { simpleState(getString(R.string.k2go_connect_hotspot_failed), getString(R.string.k2go_connect_enable_location)); return; } - - String ssid = (st.ssid != null) ? st.ssid : ""; - String pass = (st.passphrase != null) ? st.passphrase : ""; - String ip = NetworkInterfaces.discover().hotspotIp; - if (ip == null) ip = "192.168.49.1"; + /** + * ADFA-5154: Page 1 — Join ① and Get app ② stacked, both live at once. The other phone joins the + * network and installs the app from here; when it's installed, the "Installed? Copy the library" + * gate advances to Page 2. Mirrors Connect's stacked-QR page. + */ + private void renderPrepare() { + // ---- Section ① : Join the network ---- + if (mode == Mode.HOTSPOT) { + secJoinTitle.setText(getString(R.string.k2go_clone_join_hotspot_title)); + shareWifi.setVisibility(View.GONE); + LocalHotspotManager.State st = hs.state().getValue(); + LocalHotspotManager.Phase phase = (st != null) ? st.phase : LocalHotspotManager.Phase.OFF; + if (!LocalHotspotManager.isSupported()) { + secJoin.frame.setVisibility(View.GONE); + secJoin.setFallback(requireContext(), null); + secJoin.caption.setText(getString(R.string.k2go_connect_hotspot_unsupported)); + secJoin.subCaption.setText(getString(R.string.k2go_connect_try_wifi)); + } else if (phase == LocalHotspotManager.Phase.FAILED) { + secJoin.frame.setVisibility(View.GONE); + secJoin.setFallback(requireContext(), null); + secJoin.caption.setText(getString(R.string.k2go_connect_hotspot_failed)); + secJoin.subCaption.setText(getString(R.string.k2go_connect_enable_location)); + } else if (phase == LocalHotspotManager.Phase.OFF || phase == LocalHotspotManager.Phase.STARTING) { + secJoin.frame.setVisibility(View.VISIBLE); + secJoin.setQr(requireContext(), null, getString(R.string.k2go_connect_starting_hotspot)); + secJoin.setFallback(requireContext(), null); + secJoin.caption.setText(getString(R.string.k2go_connect_starting_hotspot)); + secJoin.subCaption.setText(""); + } else { + String ssid = (st.ssid != null) ? st.ssid : ""; + String pass = (st.passphrase != null) ? st.passphrase : ""; + secJoin.frame.setVisibility(View.VISIBLE); + secJoin.setQr(requireContext(), "WIFI:S:" + ssid + ";T:WPA;P:" + pass + ";;", null); + secJoin.caption.setText(getString(R.string.k2go_clone_point_camera_join)); + secJoin.subCaption.setText(""); + secJoin.setFallback(requireContext(), new String[]{ + getString(R.string.k2go_fallback_wifi, ssid), getString(R.string.k2go_fallback_pass, pass)}); + } + } else { // Wi-Fi: "join this Wi-Fi" isn't a QR the other camera can act on — instruct + Share + secJoinTitle.setText(getString(R.string.k2go_clone_join_wifi_title)); + secJoin.frame.setVisibility(View.GONE); + secJoin.setQr(requireContext(), null, null); + secJoin.setFallback(requireContext(), null); + secJoin.caption.setText(getString(R.string.k2go_clone_join_wifi_note)); + secJoin.subCaption.setText(getString(R.string.k2go_clone_share_wifi_note)); + shareWifi.setVisibility(View.VISIBLE); + } - buildSteps(true); - advance.setVisibility(View.VISIBLE); - if (stage == Stage.JOIN) { - setQr("WIFI:S:" + ssid + ";T:WPA;P:" + pass + ";;"); - stepTitle.setVisibility(View.VISIBLE); - stepTitle.setText(getString(R.string.k2go_clone_step1_title)); - caption.setText(getString(R.string.k2go_clone_point_camera_join)); - subCaption.setText(""); - setFallback(new String[]{getString(R.string.k2go_fallback_wifi, ssid), getString(R.string.k2go_fallback_pass, pass)}); - advance.setText(getString(R.string.k2go_clone_next_get_app)); - styleAdvance(true); - footer.setText(""); - sendAppEntry.setVisibility(View.GONE); - skipApp.setVisibility(View.VISIBLE); - skipApp.setText(getString(R.string.k2go_clone_skip_have_app)); + // ---- Section ② : Get the app ---- + if (mode == Mode.HOTSPOT) ensureHotspot(); + startApkServer(); + NetworkInterfaces.LanIps net = NetworkInterfaces.discover(); + String appIp = (mode == Mode.HOTSPOT) ? net.hotspotIp : net.wifiIp; + if (appIp == null || apkServer == null) { + secGetApp.setQr(requireContext(), null, getString(R.string.k2go_clone_starting_service)); } else { - advance.setText(getString(R.string.k2go_clone_back_step1)); - styleAdvance(false); - ensureDaemon(ip); - renderStartState(ip, true); + String url = "http://" + appIp + ":" + shareConfig.apkPort + "/" + apkFileName; + secGetApp.setQr(requireContext(), url, null); } + secGetApp.caption.setText(getString(R.string.k2go_clone_getapp_caption)); + secGetApp.subCaption.setText(""); + secGetApp.setFallback(requireContext(), null); + hint.setVisibility(View.VISIBLE); + getAppBanner.setVisibility(View.VISIBLE); } - private void renderWifi() { - String ip = NetworkInterfaces.discover().wifiIp; - if (ip == null) { buildSteps(false); advance.setVisibility(View.GONE); simpleState(getString(R.string.k2go_connect_no_wifi), getString(R.string.k2go_connect_join_wifi)); return; } - buildSteps(false); - if (stage == Stage.JOIN) { - qr.setVisibility(View.GONE); - stepTitle.setVisibility(View.VISIBLE); - stepTitle.setText(getString(R.string.k2go_clone_step1_title)); - caption.setText(getString(R.string.k2go_clone_join_wifi_note)); - subCaption.setText(getString(R.string.k2go_clone_share_wifi_note)); - setFallback(null); - footer.setText(""); - advance.setVisibility(View.VISIBLE); - shareWifi.setVisibility(View.VISIBLE); - advance.setText(getString(R.string.k2go_clone_next_get_app)); - styleAdvance(true); - skipApp.setVisibility(View.VISIBLE); - skipApp.setText(getString(R.string.k2go_clone_skip_have_app)); - } else { - advance.setVisibility(View.VISIBLE); - advance.setText(getString(R.string.k2go_clone_back_step1)); - styleAdvance(false); - ensureDaemon(ip); - renderStartState(ip, false); - } + /** + * ADFA-5154: Page 2 — Copy the library. Starts the daemon and shows the transfer QR. This is the + * point of no easy return: the confinement callback (armed at acceptance) keeps the user here. + */ + private void renderCopy() { + NetworkInterfaces.LanIps net = NetworkInterfaces.discover(); + String ip = (mode == Mode.HOTSPOT) ? net.hotspotIp : net.wifiIp; + if (mode == Mode.HOTSPOT && ip == null) ip = "192.168.49.1"; + if (ip == null) { simpleState(getString(R.string.k2go_connect_no_wifi), getString(R.string.k2go_connect_join_wifi)); return; } + ensureDaemon(ip); + renderStartState(ip, mode == Mode.HOTSPOT); } - /** Step-2 state: starting -> stopped (Start sharing) -> running (QR + Stop sharing). */ + /** Copy state: nothing-to-share -> starting -> stopped (Start sharing) -> running (QR + Stop). */ private void renderStartState(String ip, boolean twoCode) { stepTitle.setVisibility(View.VISIBLE); stepTitle.setText(getString(R.string.k2go_clone_step3_title)); @@ -705,7 +732,7 @@ private void renderStartState(String ip, boolean twoCode) { qr.setImageBitmap(null); caption.setText(getString(R.string.k2go_clone_nothing_title)); subCaption.setText(getString(R.string.k2go_clone_no_library_note)); - setFallback(null); footer.setText(""); shareCard.setVisibility(View.GONE); + footer.setText(""); shareCard.setVisibility(View.GONE); stop.setVisibility(View.VISIBLE); stop.setText(getString(R.string.k2go_clone_share_anyway)); stop.setBackgroundResource(R.drawable.k2go_getmore_bg); @@ -717,14 +744,14 @@ private void renderStartState(String ip, boolean twoCode) { qr.setImageBitmap(null); caption.setText(getString(R.string.k2go_clone_starting_service)); subCaption.setText(""); - setFallback(null); footer.setText(""); stop.setVisibility(View.GONE); shareCard.setVisibility(View.GONE); + footer.setText(""); stop.setVisibility(View.GONE); shareCard.setVisibility(View.GONE); return; } if (!daemonStarted) { // stopped by the user (or failed to start) qr.setImageBitmap(null); caption.setText(getString(R.string.k2go_clone_sharing_stopped)); subCaption.setText(getString(R.string.k2go_clone_start_service_note)); - setFallback(null); footer.setText(""); shareCard.setVisibility(View.GONE); + footer.setText(""); shareCard.setVisibility(View.GONE); showStartButton(); return; } @@ -734,7 +761,6 @@ private void renderStartState(String ip, boolean twoCode) { qr.setImageBitmap(SyncHandshakeHelper.generateQrCode(payload, 500)); caption.setText(getString(twoCode ? R.string.k2go_clone_ready_scan2 : R.string.k2go_clone_ready_scan)); subCaption.setText(getString(R.string.k2go_clone_copy_begins_note)); - setFallback(null); showCodeAsText(payload); showStopButton(); if (librarySplit != null) { @@ -748,18 +774,6 @@ private void renderStartState(String ip, boolean twoCode) { footer.setText(getString(R.string.k2go_clone_stays_on)); } - // ------------------------------------------------------------ "Send the app" (ADFA-4785) - - private void renderSendApp() { - if (mode == Mode.HOTSPOT) ensureHotspot(); - startApkServer(); - NetworkInterfaces.LanIps net = NetworkInterfaces.discover(); - String ip = (mode == Mode.HOTSPOT) ? net.hotspotIp : net.wifiIp; - if (ip == null || apkServer == null) { sendAppQr.setImageBitmap(null); return; } - String url = "http://" + ip + ":" + shareConfig.apkPort + "/" + apkFileName; - sendAppQr.setImageBitmap(SyncHandshakeHelper.generateQrCode(url, 500)); - } - private void startApkServer() { if (apkServer != null) return; try { @@ -781,20 +795,6 @@ private void stopApkServer() { } } - private void getAppDoneNext() { // ADFA-4785: step 2 (Get app) done -> step 3 (Copy) - getAppDone = true; - stage = Stage.START; - stopApkServer(); - sendApp = false; - render(); - } - - private void exitSendApp() { - stopApkServer(); - sendApp = false; - render(); - } - /** Fallback for a phone that can't scan: hand the installed APK to the Android share sheet. */ private void shareApkViaSheet() { try { @@ -1238,7 +1238,6 @@ private void simpleState(String cap, String sub) { qr.setImageBitmap(null); caption.setText(cap); subCaption.setText(sub); - setFallback(null); advance.setVisibility(View.GONE); stop.setVisibility(View.GONE); footer.setText(""); @@ -1251,50 +1250,17 @@ private void showCodeAsText(String payload) { codeblock.setVisibility(codeExpanded ? View.VISIBLE : View.GONE); } - private void setQr(String data) { - int px = Math.round(220 * getResources().getDisplayMetrics().density); - qr.setImageBitmap(QrCodec.encode(data, px)); - } - - private void setFallback(String[] values) { - fallbackValues.removeAllViews(); - if (values == null || values.length == 0) { - fallback.setVisibility(View.GONE); - fallbackToggle.setVisibility(View.GONE); - return; - } - for (String val : values) { - TextView t = new TextView(requireContext()); - t.setText(val); - t.setGravity(Gravity.CENTER); - t.setTextColor(ContextCompat.getColor(requireContext(), R.color.k2go_ink)); - t.setTextIsSelectable(true); - fallbackValues.addView(t); - } - // ADFA-4815: reveal-on-tap, same as Connect. The toggle sits under the subcaption; the - // Wi-Fi + password quote shows only when tapped, so a working scan stays clutter-free. - fallbackToggle.setVisibility(View.VISIBLE); - applyFallbackOpen(); - fallbackToggle.setOnClickListener(x -> { fallbackOpen = !fallbackOpen; applyFallbackOpen(); }); - } - - private void applyFallbackOpen() { - fallback.setVisibility(fallbackOpen ? View.VISIBLE : View.GONE); - fallbackToggle.setText(fallbackOpen - ? getString(R.string.k2go_hide) + " ▴" - : getString(R.string.k2go_scan_didnt_work) + " ▸"); - } - - // ---- step badges (same style as Connect): number kept, corner check when done ---- - private void buildSteps(boolean twoSteps) { // ADFA-4785: 3-step spine (Connect / Get app / Copy) + // ---- step badges (same style as Connect). ADFA-5154: Page 1 (Prepare) lights ① and ② together; + // Page 2 (Copy) lights ③ and marks ①·② done. ---- + private void buildSteps() { steps.removeAllViews(); steps.setVisibility(View.VISIBLE); - int active = sendApp ? 2 : (stage == Stage.JOIN ? 1 : 3); - steps.addView(badge("1", getString(R.string.k2go_badge_join), active == 1, active > 1)); + boolean copy = (page == Page.COPY); + steps.addView(badge("1", getString(R.string.k2go_badge_join), !copy, copy)); steps.addView(arrow()); - steps.addView(badge("2", getString(R.string.k2go_badge_getapp), active == 2, getAppDone)); + steps.addView(badge("2", getString(R.string.k2go_badge_getapp), !copy, copy)); steps.addView(arrow()); - steps.addView(badge("3", getString(R.string.k2go_badge_copy), active == 3, false)); + steps.addView(badge("3", getString(R.string.k2go_badge_copy), copy, false)); } private View badge(String num, String label, boolean active, boolean done) { diff --git a/controller/app/src/main/res/layout/fragment_k2go_clone.xml b/controller/app/src/main/res/layout/fragment_k2go_clone.xml index 8cd78509d..f1f749a46 100644 --- a/controller/app/src/main/res/layout/fragment_k2go_clone.xml +++ b/controller/app/src/main/res/layout/fragment_k2go_clone.xml @@ -1,8 +1,18 @@ + + android:background="@color/k2go_paper" android:fillViewport="true" + android:scrollbars="vertical" android:scrollbarStyle="outsideOverlay"> @@ -72,141 +82,149 @@ android:text="@string/k2go_clone_app_separate_step" android:textColor="@color/k2go_muted" android:textAppearance="?attr/textAppearanceBodySmall" /> + - + + - + + - - - - - + + - - - - - - - - - - - + + + + - - - - + + + + + + + + + + + - - - - + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + - - - - - - + - - - - - - - - - - - - - - - + @@ -406,11 +418,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:scaleType="fitCenter" /> - @@ -447,9 +454,7 @@ android:layout_marginTop="4dp" android:gravity="center" android:textColor="@color/k2go_teal" android:textAppearance="?attr/textAppearanceBodyMedium" /> - + diff --git a/controller/app/src/main/res/values/strings_k2go.xml b/controller/app/src/main/res/values/strings_k2go.xml index f41d37c16..41e21b498 100644 --- a/controller/app/src/main/res/values/strings_k2go.xml +++ b/controller/app/src/main/res/values/strings_k2go.xml @@ -288,6 +288,9 @@ FROM THE OTHER PHONE Get a K2Go version made for this phone — ask your promoter, or download the right one. Installed? Copy the library + Join my hotspot + Join the same Wi-Fi + Point the camera here to download K2Go. K2Go\'s library includes programs built to match a phone\'s hardware. When two phones are built differently, the programs from one can\'t run on the other, so copying the library wouldn\'t work. Nothing to replace Once it\'s installed, come back and copy the library. From bbc2cce9a9f514ec093ec7129a0355e0b69314cd Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Sat, 15 Aug 2026 04:40:15 -0600 Subject: [PATCH 3/7] ADFA-5154 feat(clone): 2-page Send (Join + Get app, then Copy) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collapse the Send wizard into two pages, matching the Connect stacked-QR pattern. Page 1 (Prepare) stacks two QrSection cards — ① Join the network and ② Get the app — both live at once; Page 2 (Copy) starts the daemon and shows the transfer QR. One gate ("Installed? Copy the library" / "Back to step 1") replaces the old 3-step stage machine. Removes the stage/sendApp state and the separate "Send the app" sub-screen (the APK QR is inline on Page 1 now); the daemon/transfer logic in renderStartState is unchanged. The deep app view, skip-app and send-app entry are left GONE for a follow-up cleanup once the flow is validated. Adds three Page-1 strings (join hotspot/Wi-Fi titles, get-app caption) with translations across all 33 locales. --- controller/app/src/main/res/values-ar/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-az/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-bg/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-bn/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-cs/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-de/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-el/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-es/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-fa/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-fr/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-gu/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-hi/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-hu/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-in/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-it/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-ja/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-ko/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-lt/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-nl/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-no/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-pl/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-pt/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-ro/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-ru-rRU/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-sk/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-sr/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-sw/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-ta/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-tr/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-uk/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-vi/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-yo/strings_k2go.xml | 3 +++ controller/app/src/main/res/values-zh-rCN/strings_k2go.xml | 3 +++ 33 files changed, 99 insertions(+) diff --git a/controller/app/src/main/res/values-ar/strings_k2go.xml b/controller/app/src/main/res/values-ar/strings_k2go.xml index 1f375ce03..d54c90d8f 100644 --- a/controller/app/src/main/res/values-ar/strings_k2go.xml +++ b/controller/app/src/main/res/values-ar/strings_k2go.xml @@ -808,4 +808,7 @@ تم انضمام فتح + اتصل بنقطة الاتصال الخاصة بي + اتصل بشبكة Wi-Fi نفسها + وجّه الكاميرا هنا لتنزيل K2Go. diff --git a/controller/app/src/main/res/values-az/strings_k2go.xml b/controller/app/src/main/res/values-az/strings_k2go.xml index 9f421e082..e9f2af903 100644 --- a/controller/app/src/main/res/values-az/strings_k2go.xml +++ b/controller/app/src/main/res/values-az/strings_k2go.xml @@ -808,4 +808,7 @@ Hazırdır Qoşul Aç + Hotspotuma qoşulun + Eyni Wi-Fi-a qoşulun + K2Go-nu yükləmək üçün kameranı buraya yönəldin. diff --git a/controller/app/src/main/res/values-bg/strings_k2go.xml b/controller/app/src/main/res/values-bg/strings_k2go.xml index cd9626baf..1e11fe816 100644 --- a/controller/app/src/main/res/values-bg/strings_k2go.xml +++ b/controller/app/src/main/res/values-bg/strings_k2go.xml @@ -808,4 +808,7 @@ Готово Свързване Отваряне + Свържете се с моята точка за достъп + Свържете се към същата Wi-Fi мрежа + Насочете камерата тук, за да изтеглите K2Go. diff --git a/controller/app/src/main/res/values-bn/strings_k2go.xml b/controller/app/src/main/res/values-bn/strings_k2go.xml index 5e9a9d11d..084a08cb6 100644 --- a/controller/app/src/main/res/values-bn/strings_k2go.xml +++ b/controller/app/src/main/res/values-bn/strings_k2go.xml @@ -808,4 +808,7 @@ সম্পন্ন যোগ খুলুন + আমার হটস্পটে যুক্ত হোন + একই ওয়াই-ফাই-তে যুক্ত হোন + K2Go ডাউনলোড করতে ক্যামেরা এখানে তাক করুন। diff --git a/controller/app/src/main/res/values-cs/strings_k2go.xml b/controller/app/src/main/res/values-cs/strings_k2go.xml index e770d7f24..3099eb248 100644 --- a/controller/app/src/main/res/values-cs/strings_k2go.xml +++ b/controller/app/src/main/res/values-cs/strings_k2go.xml @@ -808,4 +808,7 @@ Hotovo Připojit Otevřít + Připojte se k mému hotspotu + Připojte se ke stejné Wi-Fi + Namiřte sem fotoaparát a stáhněte si K2Go. diff --git a/controller/app/src/main/res/values-de/strings_k2go.xml b/controller/app/src/main/res/values-de/strings_k2go.xml index 944d2486f..b2fc5fc2a 100644 --- a/controller/app/src/main/res/values-de/strings_k2go.xml +++ b/controller/app/src/main/res/values-de/strings_k2go.xml @@ -809,4 +809,7 @@ Fertig Verbinden Öffnen + Meinen Hotspot beitreten + Mit demselben WLAN verbinden + Kamera hierauf richten, um K2Go herunterzuladen. diff --git a/controller/app/src/main/res/values-el/strings_k2go.xml b/controller/app/src/main/res/values-el/strings_k2go.xml index d84f2c226..fccf6c8dc 100644 --- a/controller/app/src/main/res/values-el/strings_k2go.xml +++ b/controller/app/src/main/res/values-el/strings_k2go.xml @@ -809,4 +809,7 @@ Τέλος Σύνδεση Άνοιγμα + Σύνδεση στο hotspot μου + Σύνδεση στο ίδιο Wi-Fi + Στρέψτε την κάμερα εδώ για λήψη του K2Go. diff --git a/controller/app/src/main/res/values-es/strings_k2go.xml b/controller/app/src/main/res/values-es/strings_k2go.xml index e338e0a03..f687a8105 100644 --- a/controller/app/src/main/res/values-es/strings_k2go.xml +++ b/controller/app/src/main/res/values-es/strings_k2go.xml @@ -808,4 +808,7 @@ Listo Unirse Abrir + Únete a mi zona Wi-Fi + Conéctate al mismo Wi-Fi + Apunta la cámara aquí para descargar K2Go. diff --git a/controller/app/src/main/res/values-fa/strings_k2go.xml b/controller/app/src/main/res/values-fa/strings_k2go.xml index a0194dee3..03b89db86 100644 --- a/controller/app/src/main/res/values-fa/strings_k2go.xml +++ b/controller/app/src/main/res/values-fa/strings_k2go.xml @@ -808,4 +808,7 @@ انجام شد پیوستن باز کردن + به هات‌اسپات من متصل شوید + به همان Wi-Fi متصل شوید + برای دانلود K2Go دوربین را اینجا بگیرید. diff --git a/controller/app/src/main/res/values-fr/strings_k2go.xml b/controller/app/src/main/res/values-fr/strings_k2go.xml index 85785cb5d..8726af044 100644 --- a/controller/app/src/main/res/values-fr/strings_k2go.xml +++ b/controller/app/src/main/res/values-fr/strings_k2go.xml @@ -818,4 +818,7 @@ Terminé Rejoindre Ouvrir + Rejoindre mon point d\'accès + Rejoindre le même Wi-Fi + Pointez la caméra ici pour télécharger K2Go. diff --git a/controller/app/src/main/res/values-gu/strings_k2go.xml b/controller/app/src/main/res/values-gu/strings_k2go.xml index c845db07c..607eee759 100644 --- a/controller/app/src/main/res/values-gu/strings_k2go.xml +++ b/controller/app/src/main/res/values-gu/strings_k2go.xml @@ -808,4 +808,7 @@ થઈ ગયું જોડાઓ ખોલો + મારા હૉટસ્પૉટ સાથે જોડાઓ + એ જ Wi-Fi સાથે જોડાઓ + K2Go ડાઉનલોડ કરવા કૅમેરા અહીં તાકો. diff --git a/controller/app/src/main/res/values-hi/strings_k2go.xml b/controller/app/src/main/res/values-hi/strings_k2go.xml index d3c035516..fe4967b4f 100644 --- a/controller/app/src/main/res/values-hi/strings_k2go.xml +++ b/controller/app/src/main/res/values-hi/strings_k2go.xml @@ -808,4 +808,7 @@ हो गया जुड़ें खोलें + मेरे हॉटस्पॉट से जुड़ें + उसी वाई-फ़ाई से जुड़ें + K2Go डाउनलोड करने के लिए कैमरा यहाँ लगाएँ। diff --git a/controller/app/src/main/res/values-hu/strings_k2go.xml b/controller/app/src/main/res/values-hu/strings_k2go.xml index 46a1f1420..c29696731 100644 --- a/controller/app/src/main/res/values-hu/strings_k2go.xml +++ b/controller/app/src/main/res/values-hu/strings_k2go.xml @@ -808,4 +808,7 @@ Kész Csatlakozás Megnyitás + Csatlakozás a hotspotomhoz + Csatlakozás ugyanahhoz a Wi-Fi-hez + Irányítsa ide a kamerát a K2Go letöltéséhez. diff --git a/controller/app/src/main/res/values-in/strings_k2go.xml b/controller/app/src/main/res/values-in/strings_k2go.xml index 2f569bd41..9ce9a0f34 100644 --- a/controller/app/src/main/res/values-in/strings_k2go.xml +++ b/controller/app/src/main/res/values-in/strings_k2go.xml @@ -808,4 +808,7 @@ Selesai Gabung Buka + Gabung ke hotspot saya + Sambungkan ke Wi-Fi yang sama + Arahkan kamera ke sini untuk mengunduh K2Go. diff --git a/controller/app/src/main/res/values-it/strings_k2go.xml b/controller/app/src/main/res/values-it/strings_k2go.xml index 5bff164f7..522d4ada5 100644 --- a/controller/app/src/main/res/values-it/strings_k2go.xml +++ b/controller/app/src/main/res/values-it/strings_k2go.xml @@ -808,4 +808,7 @@ Fatto Unisciti Apri + Connettiti al mio hotspot + Connettiti alla stessa rete Wi-Fi + Inquadra qui con la fotocamera per scaricare K2Go. diff --git a/controller/app/src/main/res/values-ja/strings_k2go.xml b/controller/app/src/main/res/values-ja/strings_k2go.xml index a91f5cf14..6fe8376fa 100644 --- a/controller/app/src/main/res/values-ja/strings_k2go.xml +++ b/controller/app/src/main/res/values-ja/strings_k2go.xml @@ -808,4 +808,7 @@ 完了 参加 開く + 自分のホットスポットに接続 + 同じ Wi-Fi に接続 + カメラをここに向けて K2Go をダウンロードします。 diff --git a/controller/app/src/main/res/values-ko/strings_k2go.xml b/controller/app/src/main/res/values-ko/strings_k2go.xml index f94e5a416..17c9f8bc1 100644 --- a/controller/app/src/main/res/values-ko/strings_k2go.xml +++ b/controller/app/src/main/res/values-ko/strings_k2go.xml @@ -808,4 +808,7 @@ 완료 연결 열기 + 내 핫스팟에 연결 + 같은 Wi-Fi에 연결 + 여기에 카메라를 비춰 K2Go를 다운로드하세요. diff --git a/controller/app/src/main/res/values-lt/strings_k2go.xml b/controller/app/src/main/res/values-lt/strings_k2go.xml index c244e2159..5798b1b03 100644 --- a/controller/app/src/main/res/values-lt/strings_k2go.xml +++ b/controller/app/src/main/res/values-lt/strings_k2go.xml @@ -818,4 +818,7 @@ Atlikta Prisijungti Atverti + Prisijunkite prie mano viešosios prieigos taško + Prisijunkite prie to paties „Wi-Fi“ + Nukreipkite kamerą čia, kad atsisiųstumėte K2Go. diff --git a/controller/app/src/main/res/values-nl/strings_k2go.xml b/controller/app/src/main/res/values-nl/strings_k2go.xml index 3863c2c97..730b30297 100644 --- a/controller/app/src/main/res/values-nl/strings_k2go.xml +++ b/controller/app/src/main/res/values-nl/strings_k2go.xml @@ -808,4 +808,7 @@ Klaar Verbinden Openen + Verbind met mijn hotspot + Verbind met hetzelfde wifi-netwerk + Richt de camera hierop om K2Go te downloaden. diff --git a/controller/app/src/main/res/values-no/strings_k2go.xml b/controller/app/src/main/res/values-no/strings_k2go.xml index 3a1f0fc19..a69148c80 100644 --- a/controller/app/src/main/res/values-no/strings_k2go.xml +++ b/controller/app/src/main/res/values-no/strings_k2go.xml @@ -818,4 +818,7 @@ Ferdig Koble til Åpne + Koble til hotspotet mitt + Koble til samme Wi-Fi + Rett kameraet hit for å laste ned K2Go. diff --git a/controller/app/src/main/res/values-pl/strings_k2go.xml b/controller/app/src/main/res/values-pl/strings_k2go.xml index 428d214f8..f5d17b7e5 100644 --- a/controller/app/src/main/res/values-pl/strings_k2go.xml +++ b/controller/app/src/main/res/values-pl/strings_k2go.xml @@ -818,4 +818,7 @@ Gotowe Połącz Otwórz + Połącz z moim hotspotem + Połącz z tą samą siecią Wi-Fi + Skieruj tu aparat, aby pobrać K2Go. diff --git a/controller/app/src/main/res/values-pt/strings_k2go.xml b/controller/app/src/main/res/values-pt/strings_k2go.xml index dc23606bf..050c46e04 100644 --- a/controller/app/src/main/res/values-pt/strings_k2go.xml +++ b/controller/app/src/main/res/values-pt/strings_k2go.xml @@ -808,4 +808,7 @@ Concluído Entrar Abrir + Conecte-se ao meu ponto de acesso + Conecte-se ao mesmo Wi-Fi + Aponte a câmera aqui para baixar o K2Go. diff --git a/controller/app/src/main/res/values-ro/strings_k2go.xml b/controller/app/src/main/res/values-ro/strings_k2go.xml index 9e308f739..6ef0a944b 100644 --- a/controller/app/src/main/res/values-ro/strings_k2go.xml +++ b/controller/app/src/main/res/values-ro/strings_k2go.xml @@ -808,4 +808,7 @@ Gata Conectare Deschide + Conectează-te la hotspotul meu + Conectează-te la aceeași rețea Wi-Fi + Îndreaptă camera aici pentru a descărca K2Go. diff --git a/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml b/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml index bff645ebc..ece31c6d0 100644 --- a/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml +++ b/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml @@ -808,4 +808,7 @@ Готово Подключиться Открыть + Подключитесь к моей точке доступа + Подключитесь к той же сети Wi-Fi + Наведите камеру сюда, чтобы скачать K2Go. diff --git a/controller/app/src/main/res/values-sk/strings_k2go.xml b/controller/app/src/main/res/values-sk/strings_k2go.xml index 24c5ae935..b76f7b4d1 100644 --- a/controller/app/src/main/res/values-sk/strings_k2go.xml +++ b/controller/app/src/main/res/values-sk/strings_k2go.xml @@ -808,4 +808,7 @@ Hotovo Pripojiť Otvoriť + Pripojte sa k môjmu hotspotu + Pripojte sa k rovnakej Wi-Fi + Namierte sem fotoaparát a stiahnite si K2Go. diff --git a/controller/app/src/main/res/values-sr/strings_k2go.xml b/controller/app/src/main/res/values-sr/strings_k2go.xml index 6b3259969..99464642a 100644 --- a/controller/app/src/main/res/values-sr/strings_k2go.xml +++ b/controller/app/src/main/res/values-sr/strings_k2go.xml @@ -808,4 +808,7 @@ Готово Придружи се Отвори + Придружите се мојој приступној тачки + Повежите се на исти Wi-Fi + Усмерите камеру овде да преузмете K2Go. diff --git a/controller/app/src/main/res/values-sw/strings_k2go.xml b/controller/app/src/main/res/values-sw/strings_k2go.xml index ff6e761fd..1f37dab28 100644 --- a/controller/app/src/main/res/values-sw/strings_k2go.xml +++ b/controller/app/src/main/res/values-sw/strings_k2go.xml @@ -808,4 +808,7 @@ Imekamilika Jiunge Fungua + Jiunge na mtandao wangu wa hotspot + Jiunge na Wi-Fi ile ile + Elekeza kamera hapa ili kupakua K2Go. diff --git a/controller/app/src/main/res/values-ta/strings_k2go.xml b/controller/app/src/main/res/values-ta/strings_k2go.xml index 4c1cb96c3..143b908e1 100644 --- a/controller/app/src/main/res/values-ta/strings_k2go.xml +++ b/controller/app/src/main/res/values-ta/strings_k2go.xml @@ -808,4 +808,7 @@ முடிந்தது இணை திற + எனது ஹாட்ஸ்பாட்டுடன் இணையவும் + அதே Wi-Fi உடன் இணையவும் + K2Go ஐப் பதிவிறக்க கேமராவை இங்கே காட்டவும். diff --git a/controller/app/src/main/res/values-tr/strings_k2go.xml b/controller/app/src/main/res/values-tr/strings_k2go.xml index d6ccf4dc3..91bf723bf 100644 --- a/controller/app/src/main/res/values-tr/strings_k2go.xml +++ b/controller/app/src/main/res/values-tr/strings_k2go.xml @@ -808,4 +808,7 @@ Bitti Katıl Aç + Etkin noktama bağlan + Aynı Wi-Fi\'ye bağlan + K2Go\'yu indirmek için kamerayı buraya doğrult. diff --git a/controller/app/src/main/res/values-uk/strings_k2go.xml b/controller/app/src/main/res/values-uk/strings_k2go.xml index 426749880..e3f3386f3 100644 --- a/controller/app/src/main/res/values-uk/strings_k2go.xml +++ b/controller/app/src/main/res/values-uk/strings_k2go.xml @@ -808,4 +808,7 @@ Готово Приєднатися Відкрити + Підключіться до моєї точки доступу + Підключіться до тієї ж мережі Wi-Fi + Наведіть камеру сюди, щоб завантажити K2Go. diff --git a/controller/app/src/main/res/values-vi/strings_k2go.xml b/controller/app/src/main/res/values-vi/strings_k2go.xml index 2697aab7f..d2d63d998 100644 --- a/controller/app/src/main/res/values-vi/strings_k2go.xml +++ b/controller/app/src/main/res/values-vi/strings_k2go.xml @@ -808,4 +808,7 @@ Xong Tham gia Mở + Kết nối với điểm phát sóng của tôi + Kết nối cùng một Wi-Fi + Hướng camera vào đây để tải K2Go. diff --git a/controller/app/src/main/res/values-yo/strings_k2go.xml b/controller/app/src/main/res/values-yo/strings_k2go.xml index 0069d9a59..f68d6e8ee 100644 --- a/controller/app/src/main/res/values-yo/strings_k2go.xml +++ b/controller/app/src/main/res/values-yo/strings_k2go.xml @@ -808,4 +808,7 @@ Parí Darapọ̀ Ṣí + Darapọ̀ mọ́ hotspot mi + Darapọ̀ mọ́ Wi-Fi kan náà + Tọ́ kamẹra síhìn-ín láti gba K2Go wọlé. diff --git a/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml b/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml index 3a29c901d..d22b55408 100644 --- a/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml +++ b/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml @@ -808,4 +808,7 @@ 完成 加入 打开 + 加入我的热点 + 连接同一个 Wi-Fi + 将摄像头对准这里下载 K2Go。 From 2f5d1c1c359a6f383cd2c12db62e4b2bd84b0b02 Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Sat, 15 Aug 2026 14:51:17 -0600 Subject: [PATCH 4/7] ADFA-5154 fix(clone): pin the top chrome, drop the STEP 2 BELOW hint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match Connect's layout: move the header/back + Send/Receive tabs + Hotspot/Wi-Fi selector out of the ScrollView into a pinned block, so the active network stays visible while the QR content scrolls. Only fork, the stepper, the two Send pages and the Receive box scroll now. Also stop showing the "STEP 2 BELOW" hint on Page 1 — Connect keeps its equivalent hidden, so Clone matches. --- .../controller/redesign/CloneFragment.java | 2 +- .../main/res/layout/fragment_k2go_clone.xml | 59 +++++++++++-------- 2 files changed, 37 insertions(+), 24 deletions(-) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java index 995d8bf48..f4266775c 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java @@ -707,7 +707,7 @@ private void renderPrepare() { secGetApp.caption.setText(getString(R.string.k2go_clone_getapp_caption)); secGetApp.subCaption.setText(""); secGetApp.setFallback(requireContext(), null); - hint.setVisibility(View.VISIBLE); + // ADFA-5154: no "STEP 2 BELOW" hint — Connect keeps its equivalent hidden, so Clone matches. getAppBanner.setVisibility(View.VISIBLE); } diff --git a/controller/app/src/main/res/layout/fragment_k2go_clone.xml b/controller/app/src/main/res/layout/fragment_k2go_clone.xml index f1f749a46..4a7306c87 100644 --- a/controller/app/src/main/res/layout/fragment_k2go_clone.xml +++ b/controller/app/src/main/res/layout/fragment_k2go_clone.xml @@ -8,13 +8,17 @@ view_k2go_qr_section (ADFA-5157) bound by QrSection. Fork, tabs and the whole Receive box are unchanged. See CloneFragment. --> - + android:orientation="vertical" android:background="@color/k2go_paper"> + + + android:orientation="vertical" android:paddingLeft="16dp" android:paddingRight="16dp" + android:paddingTop="16dp" android:paddingBottom="8dp"> @@ -26,8 +30,32 @@ android:layout_marginTop="4dp" android:padding="4dp" android:text="@string/k2go_back_link" android:textColor="@color/k2go_teal" android:textAppearance="?attr/textAppearanceBodyLarge" android:clickable="true" android:focusable="true" android:visibility="gone" /> + + + + + + + + + + + + + + + + android:orientation="vertical" android:layout_marginTop="8dp" android:visibility="gone"> - - - - - - - - - - - - + + + From 3ae507824c3e82f360310352a26b9d1c5ed1c001 Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Sat, 15 Aug 2026 15:09:06 -0600 Subject: [PATCH 5/7] ADFA-5154 fix(clone): animate "Starting service", pin the action button, align sharing label Page 2 (Copy) polish plus a matching Library label: - "Starting service" now animates its trailing dots via the shared EllipsisAnimator (as Library/Backup do), so the wait never looks frozen. - Stop sharing (and its Start sharing / Share anyway / Recover variants) moves to a pinned bottom footer, fixed like Library's "Get more" and Settings' "Turn off K2Go", instead of scrolling with the content. - Library's sharing banner "Sharing with another phone" becomes "Transferring between devices", matching the notification wording, across the base string and all 33 locales. --- .../controller/redesign/CloneFragment.java | 24 ++++++++++++------- .../main/res/layout/fragment_k2go_clone.xml | 18 ++++++++++---- .../src/main/res/values-ar/strings_k2go.xml | 2 +- .../src/main/res/values-az/strings_k2go.xml | 2 +- .../src/main/res/values-bg/strings_k2go.xml | 2 +- .../src/main/res/values-bn/strings_k2go.xml | 2 +- .../src/main/res/values-cs/strings_k2go.xml | 2 +- .../src/main/res/values-de/strings_k2go.xml | 2 +- .../src/main/res/values-el/strings_k2go.xml | 2 +- .../src/main/res/values-es/strings_k2go.xml | 2 +- .../src/main/res/values-fa/strings_k2go.xml | 2 +- .../src/main/res/values-fr/strings_k2go.xml | 2 +- .../src/main/res/values-gu/strings_k2go.xml | 2 +- .../src/main/res/values-hi/strings_k2go.xml | 2 +- .../src/main/res/values-hu/strings_k2go.xml | 2 +- .../src/main/res/values-in/strings_k2go.xml | 2 +- .../src/main/res/values-it/strings_k2go.xml | 2 +- .../src/main/res/values-ja/strings_k2go.xml | 2 +- .../src/main/res/values-ko/strings_k2go.xml | 2 +- .../src/main/res/values-lt/strings_k2go.xml | 2 +- .../src/main/res/values-nl/strings_k2go.xml | 2 +- .../src/main/res/values-no/strings_k2go.xml | 2 +- .../src/main/res/values-pl/strings_k2go.xml | 2 +- .../src/main/res/values-pt/strings_k2go.xml | 2 +- .../src/main/res/values-ro/strings_k2go.xml | 2 +- .../main/res/values-ru-rRU/strings_k2go.xml | 2 +- .../src/main/res/values-sk/strings_k2go.xml | 2 +- .../src/main/res/values-sr/strings_k2go.xml | 2 +- .../src/main/res/values-sw/strings_k2go.xml | 2 +- .../src/main/res/values-ta/strings_k2go.xml | 2 +- .../src/main/res/values-tr/strings_k2go.xml | 2 +- .../src/main/res/values-uk/strings_k2go.xml | 2 +- .../src/main/res/values-vi/strings_k2go.xml | 2 +- .../src/main/res/values-yo/strings_k2go.xml | 2 +- .../main/res/values-zh-rCN/strings_k2go.xml | 2 +- .../app/src/main/res/values/strings_k2go.xml | 2 +- 36 files changed, 62 insertions(+), 48 deletions(-) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java index f4266775c..af56a4b08 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java @@ -137,6 +137,8 @@ private enum RStage { JOIN, START } private ImageView qr; private TextView showcode, codetext, copyBtn, shareBtn; private LinearLayout codeblock; + private LinearLayout actionFooter; // ADFA-5154: pinned wrapper for the stop/start/recover button + private org.iiab.controller.util.EllipsisAnimator startingDots; // ADFA-5154: animated "Starting service…" private String currentPayload = ""; private boolean codeExpanded = false; @@ -183,7 +185,9 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c ((TextView) getAppRoot.findViewById(R.id.sec_title)).setText(getString(R.string.k2go_badge_getapp)); advance = v.findViewById(R.id.k2go_clone_advance); stop = v.findViewById(R.id.k2go_clone_stop); + actionFooter = v.findViewById(R.id.k2go_clone_action_footer); // ADFA-5154: pinned action button footer = v.findViewById(R.id.k2go_clone_footer); + startingDots = new org.iiab.controller.util.EllipsisAnimator(caption, true); // animated "Starting service…" shareCard = v.findViewById(R.id.k2go_clone_sharecard); sizeSys = v.findViewById(R.id.k2go_clone_size_sys); sizeContent = v.findViewById(R.id.k2go_clone_size_content); @@ -535,6 +539,7 @@ private void releaseCloneEnv() { private void render() { if (!isAdded() || caption == null) return; + if (startingDots != null) startingDots.stop(); // ADFA-5154: only the daemon-starting state re-starts it updateBackGuard(); // ADFA-5151: keep the Back confinement in step with side + transfer state if (showcode != null) { showcode.setVisibility(View.GONE); codeblock.setVisibility(View.GONE); } if (stepTitle != null) { stepTitle.setVisibility(View.GONE); skipApp.setVisibility(View.GONE); shareWifi.setVisibility(View.GONE); } @@ -552,7 +557,7 @@ private void render() { page1.setVisibility(View.GONE); page2.setVisibility(View.GONE); advance.setVisibility(View.GONE); - stop.setVisibility(View.GONE); + actionFooter.setVisibility(View.GONE); footer.setVisibility(View.GONE); shareCard.setVisibility(View.GONE); sendAppEntry.setVisibility(View.GONE); @@ -573,7 +578,7 @@ private void render() { page1.setVisibility(View.GONE); page2.setVisibility(View.GONE); advance.setVisibility(View.GONE); - stop.setVisibility(View.GONE); + actionFooter.setVisibility(View.GONE); footer.setVisibility(View.GONE); shareCard.setVisibility(View.GONE); sendAppEntry.setVisibility(View.GONE); @@ -637,7 +642,7 @@ private void renderNoSystemSend() { shareCard.setVisibility(View.GONE); sendAppEntry.setVisibility(View.GONE); sendAppView.setVisibility(View.GONE); advance.setVisibility(View.GONE); - stop.setVisibility(View.VISIBLE); + actionFooter.setVisibility(View.VISIBLE); stop.setText(getString(R.string.k2go_home_recover)); stop.setBackgroundResource(R.drawable.k2go_primary_bg); stop.setTextColor(ContextCompat.getColor(requireContext(), R.color.k2go_on_teal)); @@ -733,7 +738,7 @@ private void renderStartState(String ip, boolean twoCode) { caption.setText(getString(R.string.k2go_clone_nothing_title)); subCaption.setText(getString(R.string.k2go_clone_no_library_note)); footer.setText(""); shareCard.setVisibility(View.GONE); - stop.setVisibility(View.VISIBLE); + actionFooter.setVisibility(View.VISIBLE); stop.setText(getString(R.string.k2go_clone_share_anyway)); stop.setBackgroundResource(R.drawable.k2go_getmore_bg); stop.setTextColor(ContextCompat.getColor(requireContext(), R.color.k2go_teal)); @@ -742,9 +747,9 @@ private void renderStartState(String ip, boolean twoCode) { } if (daemonStarting) { qr.setImageBitmap(null); - caption.setText(getString(R.string.k2go_clone_starting_service)); + startingDots.start(getString(R.string.k2go_clone_starting_service)); // animated "…" subCaption.setText(""); - footer.setText(""); stop.setVisibility(View.GONE); shareCard.setVisibility(View.GONE); + footer.setText(""); actionFooter.setVisibility(View.GONE); shareCard.setVisibility(View.GONE); return; } if (!daemonStarted) { // stopped by the user (or failed to start) @@ -812,7 +817,7 @@ private void shareApkViaSheet() { } private void showStopButton() { - stop.setVisibility(View.VISIBLE); + actionFooter.setVisibility(View.VISIBLE); stop.setText(getString(R.string.k2go_clone_stop_sharing)); stop.setBackgroundResource(R.drawable.k2go_turnoff_bg); stop.setTextColor(ContextCompat.getColor(requireContext(), R.color.k2go_clay)); @@ -820,7 +825,7 @@ private void showStopButton() { } private void showStartButton() { - stop.setVisibility(View.VISIBLE); + actionFooter.setVisibility(View.VISIBLE); stop.setText(getString(R.string.k2go_clone_start_sharing)); stop.setBackgroundResource(R.drawable.k2go_primary_bg); stop.setTextColor(ContextCompat.getColor(requireContext(), R.color.k2go_on_teal)); @@ -1209,6 +1214,7 @@ public void onPause() { @Override public void onDestroyView() { super.onDestroyView(); + if (startingDots != null) startingDots.stop(); // ADFA-5154: no dangling Handler after the view is gone // ADFA-4782: release protection only when nothing is running; an active share daemon or pull // keeps the (app-scoped) CloneShareService alive so leaving the tab doesn't cut the transfer. // ADFA-4956: same gate for the deep-env lock — only boot the server back + drop the lock when @@ -1239,7 +1245,7 @@ private void simpleState(String cap, String sub) { caption.setText(cap); subCaption.setText(sub); advance.setVisibility(View.GONE); - stop.setVisibility(View.GONE); + actionFooter.setVisibility(View.GONE); footer.setText(""); } diff --git a/controller/app/src/main/res/layout/fragment_k2go_clone.xml b/controller/app/src/main/res/layout/fragment_k2go_clone.xml index 4a7306c87..87a380d10 100644 --- a/controller/app/src/main/res/layout/fragment_k2go_clone.xml +++ b/controller/app/src/main/res/layout/fragment_k2go_clone.xml @@ -211,11 +211,6 @@ - - @@ -486,4 +481,17 @@ + + + + + diff --git a/controller/app/src/main/res/values-ar/strings_k2go.xml b/controller/app/src/main/res/values-ar/strings_k2go.xml index d54c90d8f..4d1d277e8 100644 --- a/controller/app/src/main/res/values-ar/strings_k2go.xml +++ b/controller/app/src/main/res/values-ar/strings_k2go.xml @@ -45,7 +45,7 @@ إعادة المحاولة تثبيت نظام النسخ من هاتف آخر - المشاركة مع هاتف آخر + جارٍ النقل بين الأجهزة عرض diff --git a/controller/app/src/main/res/values-az/strings_k2go.xml b/controller/app/src/main/res/values-az/strings_k2go.xml index e9f2af903..d9aa2c25b 100644 --- a/controller/app/src/main/res/values-az/strings_k2go.xml +++ b/controller/app/src/main/res/values-az/strings_k2go.xml @@ -45,7 +45,7 @@ Yenidən cəhd Sistem qur Başqa telefondan klonlanır - Başqa telefonla paylaşılır + Cihazlar arasında köçürülür Bax diff --git a/controller/app/src/main/res/values-bg/strings_k2go.xml b/controller/app/src/main/res/values-bg/strings_k2go.xml index 1e11fe816..57fae0e9d 100644 --- a/controller/app/src/main/res/values-bg/strings_k2go.xml +++ b/controller/app/src/main/res/values-bg/strings_k2go.xml @@ -45,7 +45,7 @@ Опитай пак Инсталирай система Клониране от друг телефон - Споделяне с друг телефон + Прехвърляне между устройства Виж diff --git a/controller/app/src/main/res/values-bn/strings_k2go.xml b/controller/app/src/main/res/values-bn/strings_k2go.xml index 084a08cb6..03995c649 100644 --- a/controller/app/src/main/res/values-bn/strings_k2go.xml +++ b/controller/app/src/main/res/values-bn/strings_k2go.xml @@ -45,7 +45,7 @@ আবার চেষ্টা সিস্টেম ইনস্টল করুন অন্য ফোন থেকে কপি হচ্ছে - অন্য ফোনের সাথে শেয়ার হচ্ছে + ডিভাইসের মধ্যে স্থানান্তর হচ্ছে দেখুন diff --git a/controller/app/src/main/res/values-cs/strings_k2go.xml b/controller/app/src/main/res/values-cs/strings_k2go.xml index 3099eb248..1a79aadca 100644 --- a/controller/app/src/main/res/values-cs/strings_k2go.xml +++ b/controller/app/src/main/res/values-cs/strings_k2go.xml @@ -45,7 +45,7 @@ Zkusit znovu Nainstalovat systém Klonování z jiného telefonu - Sdílení s jiným telefonem + Přenos mezi zařízeními Zobrazit diff --git a/controller/app/src/main/res/values-de/strings_k2go.xml b/controller/app/src/main/res/values-de/strings_k2go.xml index b2fc5fc2a..fb53fc3bc 100644 --- a/controller/app/src/main/res/values-de/strings_k2go.xml +++ b/controller/app/src/main/res/values-de/strings_k2go.xml @@ -46,7 +46,7 @@ Erneut versuchen System installieren Klonen von einem anderen Telefon - Teilen mit einem anderen Telefon + Übertragung zwischen Geräten Ansehen diff --git a/controller/app/src/main/res/values-el/strings_k2go.xml b/controller/app/src/main/res/values-el/strings_k2go.xml index fccf6c8dc..48413ed83 100644 --- a/controller/app/src/main/res/values-el/strings_k2go.xml +++ b/controller/app/src/main/res/values-el/strings_k2go.xml @@ -46,7 +46,7 @@ Επανάληψη Εγκατάσταση συστήματος Κλωνοποίηση από άλλο τηλέφωνο - Κοινή χρήση με άλλο τηλέφωνο + Μεταφορά μεταξύ συσκευών Προβολή diff --git a/controller/app/src/main/res/values-es/strings_k2go.xml b/controller/app/src/main/res/values-es/strings_k2go.xml index f687a8105..a55f2862a 100644 --- a/controller/app/src/main/res/values-es/strings_k2go.xml +++ b/controller/app/src/main/res/values-es/strings_k2go.xml @@ -45,7 +45,7 @@ Reintentar Instalar un sistema Clonando desde otro teléfono - Compartiendo con otro teléfono + Transfiriendo entre dispositivos Ver diff --git a/controller/app/src/main/res/values-fa/strings_k2go.xml b/controller/app/src/main/res/values-fa/strings_k2go.xml index 03b89db86..6bad4e64d 100644 --- a/controller/app/src/main/res/values-fa/strings_k2go.xml +++ b/controller/app/src/main/res/values-fa/strings_k2go.xml @@ -45,7 +45,7 @@ تلاش دوباره نصب سیستم در حال کلون از تلفن دیگر - در حال اشتراک با تلفن دیگر + در حال انتقال بین دستگاه‌ها نمایش diff --git a/controller/app/src/main/res/values-fr/strings_k2go.xml b/controller/app/src/main/res/values-fr/strings_k2go.xml index 8726af044..44668a3c6 100644 --- a/controller/app/src/main/res/values-fr/strings_k2go.xml +++ b/controller/app/src/main/res/values-fr/strings_k2go.xml @@ -45,7 +45,7 @@ Réessayer Installer un système Clonage depuis un autre téléphone - Partage avec un autre téléphone + Transfert entre appareils Voir diff --git a/controller/app/src/main/res/values-gu/strings_k2go.xml b/controller/app/src/main/res/values-gu/strings_k2go.xml index 607eee759..bccc82bcb 100644 --- a/controller/app/src/main/res/values-gu/strings_k2go.xml +++ b/controller/app/src/main/res/values-gu/strings_k2go.xml @@ -45,7 +45,7 @@ ફરી પ્રયાસ સિસ્ટમ ઇન્સ્ટોલ કરો બીજા ફોનમાંથી કૉપિ થઈ રહ્યું છે - બીજા ફોન સાથે શેર થઈ રહ્યું છે + ડિવાઇસ વચ્ચે ટ્રાન્સફર થઈ રહ્યું છે જુઓ diff --git a/controller/app/src/main/res/values-hi/strings_k2go.xml b/controller/app/src/main/res/values-hi/strings_k2go.xml index fe4967b4f..cb8349da6 100644 --- a/controller/app/src/main/res/values-hi/strings_k2go.xml +++ b/controller/app/src/main/res/values-hi/strings_k2go.xml @@ -45,7 +45,7 @@ पुनः प्रयास सिस्टम इंस्टॉल करें दूसरे फ़ोन से कॉपी हो रहा है - दूसरे फ़ोन के साथ साझा हो रहा है + डिवाइसों के बीच ट्रांसफ़र हो रहा है देखें diff --git a/controller/app/src/main/res/values-hu/strings_k2go.xml b/controller/app/src/main/res/values-hu/strings_k2go.xml index c29696731..53a396027 100644 --- a/controller/app/src/main/res/values-hu/strings_k2go.xml +++ b/controller/app/src/main/res/values-hu/strings_k2go.xml @@ -45,7 +45,7 @@ Újra Rendszer telepítése Klónozás másik telefonról - Megosztás másik telefonnal + Átvitel eszközök között Megtekintés diff --git a/controller/app/src/main/res/values-in/strings_k2go.xml b/controller/app/src/main/res/values-in/strings_k2go.xml index 9ce9a0f34..4349c3468 100644 --- a/controller/app/src/main/res/values-in/strings_k2go.xml +++ b/controller/app/src/main/res/values-in/strings_k2go.xml @@ -45,7 +45,7 @@ Coba lagi Pasang sistem Menyalin dari ponsel lain - Membagikan ke ponsel lain + Mentransfer antar-perangkat Lihat diff --git a/controller/app/src/main/res/values-it/strings_k2go.xml b/controller/app/src/main/res/values-it/strings_k2go.xml index 522d4ada5..4f8e060e1 100644 --- a/controller/app/src/main/res/values-it/strings_k2go.xml +++ b/controller/app/src/main/res/values-it/strings_k2go.xml @@ -45,7 +45,7 @@ Riprova Installa un sistema Clonazione da un altro telefono - Condivisione con un altro telefono + Trasferimento tra dispositivi Vedi diff --git a/controller/app/src/main/res/values-ja/strings_k2go.xml b/controller/app/src/main/res/values-ja/strings_k2go.xml index 6fe8376fa..77c5e7ac7 100644 --- a/controller/app/src/main/res/values-ja/strings_k2go.xml +++ b/controller/app/src/main/res/values-ja/strings_k2go.xml @@ -45,7 +45,7 @@ 再試行 システムをインストール 別の端末からコピー中 - 別の端末と共有中 + デバイス間で転送中 表示 diff --git a/controller/app/src/main/res/values-ko/strings_k2go.xml b/controller/app/src/main/res/values-ko/strings_k2go.xml index 17c9f8bc1..ed207ce5c 100644 --- a/controller/app/src/main/res/values-ko/strings_k2go.xml +++ b/controller/app/src/main/res/values-ko/strings_k2go.xml @@ -45,7 +45,7 @@ 다시 시도 시스템 설치 다른 기기에서 복사 중 - 다른 기기와 공유 중 + 기기 간 전송 중 보기 diff --git a/controller/app/src/main/res/values-lt/strings_k2go.xml b/controller/app/src/main/res/values-lt/strings_k2go.xml index 5798b1b03..0c811e6e8 100644 --- a/controller/app/src/main/res/values-lt/strings_k2go.xml +++ b/controller/app/src/main/res/values-lt/strings_k2go.xml @@ -45,7 +45,7 @@ Bandyti dar kartą Įdiegti sistemą Klonuojama iš kito telefono - Bendrinama su kitu telefonu + Perkeliama tarp įrenginių Peržiūrėti diff --git a/controller/app/src/main/res/values-nl/strings_k2go.xml b/controller/app/src/main/res/values-nl/strings_k2go.xml index 730b30297..42e436480 100644 --- a/controller/app/src/main/res/values-nl/strings_k2go.xml +++ b/controller/app/src/main/res/values-nl/strings_k2go.xml @@ -45,7 +45,7 @@ Opnieuw Systeem installeren Klonen van een andere telefoon - Delen met een andere telefoon + Overdracht tussen apparaten Bekijken diff --git a/controller/app/src/main/res/values-no/strings_k2go.xml b/controller/app/src/main/res/values-no/strings_k2go.xml index a69148c80..3923b016d 100644 --- a/controller/app/src/main/res/values-no/strings_k2go.xml +++ b/controller/app/src/main/res/values-no/strings_k2go.xml @@ -45,7 +45,7 @@ Prøv igjen Installer et system Kloner fra en annen telefon - Deler med en annen telefon + Overfører mellom enheter Vis diff --git a/controller/app/src/main/res/values-pl/strings_k2go.xml b/controller/app/src/main/res/values-pl/strings_k2go.xml index f5d17b7e5..6d9c191d1 100644 --- a/controller/app/src/main/res/values-pl/strings_k2go.xml +++ b/controller/app/src/main/res/values-pl/strings_k2go.xml @@ -45,7 +45,7 @@ Ponów Zainstaluj system Klonowanie z innego telefonu - Udostępnianie innemu telefonowi + Przesyłanie między urządzeniami Zobacz diff --git a/controller/app/src/main/res/values-pt/strings_k2go.xml b/controller/app/src/main/res/values-pt/strings_k2go.xml index 050c46e04..cf6f3b228 100644 --- a/controller/app/src/main/res/values-pt/strings_k2go.xml +++ b/controller/app/src/main/res/values-pt/strings_k2go.xml @@ -45,7 +45,7 @@ Tentar novamente Instalar um sistema Clonando de outro telefone - Compartilhando com outro telefone + A transferir entre dispositivos Ver diff --git a/controller/app/src/main/res/values-ro/strings_k2go.xml b/controller/app/src/main/res/values-ro/strings_k2go.xml index 6ef0a944b..0716f0fa2 100644 --- a/controller/app/src/main/res/values-ro/strings_k2go.xml +++ b/controller/app/src/main/res/values-ro/strings_k2go.xml @@ -45,7 +45,7 @@ Reîncearcă Instalează un sistem Clonare de pe alt telefon - Partajare cu alt telefon + Se transferă între dispozitive Vezi diff --git a/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml b/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml index ece31c6d0..2ce089b50 100644 --- a/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml +++ b/controller/app/src/main/res/values-ru-rRU/strings_k2go.xml @@ -45,7 +45,7 @@ Повторить Установить систему Клонирование с другого телефона - Передача на другой телефон + Передача между устройствами Смотреть diff --git a/controller/app/src/main/res/values-sk/strings_k2go.xml b/controller/app/src/main/res/values-sk/strings_k2go.xml index b76f7b4d1..bc3483412 100644 --- a/controller/app/src/main/res/values-sk/strings_k2go.xml +++ b/controller/app/src/main/res/values-sk/strings_k2go.xml @@ -45,7 +45,7 @@ Skúsiť znova Nainštalovať systém Klonovanie z iného telefónu - Zdieľanie s iným telefónom + Prenos medzi zariadeniami Zobraziť diff --git a/controller/app/src/main/res/values-sr/strings_k2go.xml b/controller/app/src/main/res/values-sr/strings_k2go.xml index 99464642a..83add0685 100644 --- a/controller/app/src/main/res/values-sr/strings_k2go.xml +++ b/controller/app/src/main/res/values-sr/strings_k2go.xml @@ -45,7 +45,7 @@ Покушај поново Инсталирај систем Клонирање са другог телефона - Дељење са другим телефоном + Пренос између уређаја Погледај diff --git a/controller/app/src/main/res/values-sw/strings_k2go.xml b/controller/app/src/main/res/values-sw/strings_k2go.xml index 1f37dab28..b830cb2a0 100644 --- a/controller/app/src/main/res/values-sw/strings_k2go.xml +++ b/controller/app/src/main/res/values-sw/strings_k2go.xml @@ -45,7 +45,7 @@ Jaribu tena Sakinisha mfumo Inanakili kutoka simu nyingine - Inashiriki na simu nyingine + Inahamisha kati ya vifaa Tazama diff --git a/controller/app/src/main/res/values-ta/strings_k2go.xml b/controller/app/src/main/res/values-ta/strings_k2go.xml index 143b908e1..a61a54194 100644 --- a/controller/app/src/main/res/values-ta/strings_k2go.xml +++ b/controller/app/src/main/res/values-ta/strings_k2go.xml @@ -45,7 +45,7 @@ மீண்டும் முயற்சி கணினியை நிறுவு மற்றொரு தொலைபேசியிலிருந்து நகலெடுக்கிறது - மற்றொரு தொலைபேசியுடன் பங்கிடுகிறது + சாதனங்களுக்கிடையே பரிமாற்றம் பார் diff --git a/controller/app/src/main/res/values-tr/strings_k2go.xml b/controller/app/src/main/res/values-tr/strings_k2go.xml index 91bf723bf..cd82c7d10 100644 --- a/controller/app/src/main/res/values-tr/strings_k2go.xml +++ b/controller/app/src/main/res/values-tr/strings_k2go.xml @@ -45,7 +45,7 @@ Yeniden dene Sistem kur Başka telefondan kopyalanıyor - Başka telefonla paylaşılıyor + Cihazlar arasında aktarılıyor Görüntüle diff --git a/controller/app/src/main/res/values-uk/strings_k2go.xml b/controller/app/src/main/res/values-uk/strings_k2go.xml index e3f3386f3..fdd720d89 100644 --- a/controller/app/src/main/res/values-uk/strings_k2go.xml +++ b/controller/app/src/main/res/values-uk/strings_k2go.xml @@ -45,7 +45,7 @@ Повторити Встановити систему Клонування з іншого телефона - Надсилання на інший телефон + Передавання між пристроями Переглянути diff --git a/controller/app/src/main/res/values-vi/strings_k2go.xml b/controller/app/src/main/res/values-vi/strings_k2go.xml index d2d63d998..668cf9e04 100644 --- a/controller/app/src/main/res/values-vi/strings_k2go.xml +++ b/controller/app/src/main/res/values-vi/strings_k2go.xml @@ -45,7 +45,7 @@ Thử lại Cài đặt hệ thống Đang sao chép từ điện thoại khác - Đang chia sẻ với điện thoại khác + Đang chuyển giữa các thiết bị Xem diff --git a/controller/app/src/main/res/values-yo/strings_k2go.xml b/controller/app/src/main/res/values-yo/strings_k2go.xml index f68d6e8ee..dba4b4d70 100644 --- a/controller/app/src/main/res/values-yo/strings_k2go.xml +++ b/controller/app/src/main/res/values-yo/strings_k2go.xml @@ -45,7 +45,7 @@ Tún gbìyànjú Fi ẹ̀rọ sílẹ̀ Ń dà kọ láti inú fóònù mìíràn - Ń pín pẹ̀lú fóònù mìíràn + Ń gbé láàrin àwọn ẹ̀rọ Wò ó diff --git a/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml b/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml index d22b55408..c81a8d286 100644 --- a/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml +++ b/controller/app/src/main/res/values-zh-rCN/strings_k2go.xml @@ -45,7 +45,7 @@ 重试 安装系统 正在从另一台手机复制 - 正在与另一台手机共享 + 正在设备间传输 查看 diff --git a/controller/app/src/main/res/values/strings_k2go.xml b/controller/app/src/main/res/values/strings_k2go.xml index 41e21b498..4e7f4c2bf 100644 --- a/controller/app/src/main/res/values/strings_k2go.xml +++ b/controller/app/src/main/res/values/strings_k2go.xml @@ -48,7 +48,7 @@ Retry Install a system Cloning from another phone - Sharing with another phone + Transferring between devices View From 3b2d5f9e6a0e9fefd38993fac4f53976814fbd00 Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Sat, 15 Aug 2026 15:16:10 -0600 Subject: [PATCH 6/7] ADFA-5154 fix(clone): hide the pinned action footer on Page 1 The Send common chrome didn't reset the pinned footer, so returning from Copy to Page 1 (Prepare) left "Stop sharing" showing there. Default it to GONE; only Copy's states re-show it. --- .../main/java/org/iiab/controller/redesign/CloneFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java index af56a4b08..9604c81bf 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java @@ -596,6 +596,7 @@ private void render() { // ADFA-5154: Send is two pages. Common chrome, then the page. sendAppView.setVisibility(View.GONE); sendAppEntry.setVisibility(View.GONE); + actionFooter.setVisibility(View.GONE); // ADFA-5154: default hidden; only Copy's states re-show it netRow.setVisibility(View.VISIBLE); paintTab(tabHotspot, mode == Mode.HOTSPOT); paintTab(tabWifi, mode == Mode.WIFI); From 99f02abd876f1be89b8ecada9378a6e4d351b729 Mon Sep 17 00:00:00 2001 From: "Luis Guzman (AppDevForAll)" Date: Sat, 15 Aug 2026 15:25:10 -0600 Subject: [PATCH 7/7] ADFA-5154 fix(clone): scroll to top when switching Hotspot/Wi-Fi Page 1's Join section has a QR on Hotspot but not on Wi-Fi, so the two tabs differ in height and switching mid-scroll left the view offset. Snap the content ScrollView back to the top on mode change. --- .../java/org/iiab/controller/redesign/CloneFragment.java | 6 ++++++ controller/app/src/main/res/layout/fragment_k2go_clone.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java index 9604c81bf..85c6af912 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/CloneFragment.java @@ -138,6 +138,7 @@ private enum RStage { JOIN, START } private TextView showcode, codetext, copyBtn, shareBtn; private LinearLayout codeblock; private LinearLayout actionFooter; // ADFA-5154: pinned wrapper for the stop/start/recover button + private android.widget.ScrollView contentScroll; // ADFA-5154: scrolls back to top on Hotspot/Wi-Fi switch private org.iiab.controller.util.EllipsisAnimator startingDots; // ADFA-5154: animated "Starting service…" private String currentPayload = ""; private boolean codeExpanded = false; @@ -186,6 +187,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c advance = v.findViewById(R.id.k2go_clone_advance); stop = v.findViewById(R.id.k2go_clone_stop); actionFooter = v.findViewById(R.id.k2go_clone_action_footer); // ADFA-5154: pinned action button + contentScroll = v.findViewById(R.id.k2go_clone_scroll); footer = v.findViewById(R.id.k2go_clone_footer); startingDots = new org.iiab.controller.util.EllipsisAnimator(caption, true); // animated "Starting service…" shareCard = v.findViewById(R.id.k2go_clone_sharecard); @@ -408,6 +410,10 @@ private void setMode(Mode m) { if (secJoin != null) secJoin.fbOpen = false; // ADFA-4815: each mode starts with ①'s fallback collapsed if (m == Mode.HOTSPOT) ensureHotspot(); render(); // ADFA-4785: keep the current step; switching Hotspot/Wi-Fi no longer resets to step 1 + // ADFA-5154: Hotspot ① has a QR, Wi-Fi ① doesn't, so the two tabs differ in height — switching + // mid-scroll would leave the view offset. Snap back to the top (Connect avoids this: single QR + // that fits one screen). + if (contentScroll != null) contentScroll.post(() -> contentScroll.smoothScrollTo(0, 0)); } private void ensureHotspot() { diff --git a/controller/app/src/main/res/layout/fragment_k2go_clone.xml b/controller/app/src/main/res/layout/fragment_k2go_clone.xml index 87a380d10..39a26f8f5 100644 --- a/controller/app/src/main/res/layout/fragment_k2go_clone.xml +++ b/controller/app/src/main/res/layout/fragment_k2go_clone.xml @@ -48,7 +48,7 @@ -