Skip to content

Integrate setup carousel, enhance diagnostics, and UI refinements - #18

Merged
Dhangofa merged 82 commits into
mainfrom
exp
Aug 17, 2026
Merged

Integrate setup carousel, enhance diagnostics, and UI refinements#18
Dhangofa merged 82 commits into
mainfrom
exp

Conversation

@Dhangofa

Copy link
Copy Markdown
Owner

Overview

This PR introduces an interactive setup guide carousel to improve the user onboarding experience, replacing the static Quick Settings hint banner. It also significantly overhauls the diagnostic reporting engine to capture deep telemetry (stdout, exit codes, exceptions) for better troubleshooting of Root/Shizuku execution failures.

Key Changes

✨ UI & User Experience

  • Setup Carousel (ViewPager2): Implemented an interactive setup guide on the main screen to walk users through Execution Modes, Target SIM/Cycle configs, and Quick Settings integration.
    • Added SetupCarouselAdapter and item_setup_carousel.xml.
    • Added dynamic background tones for carousel pages in both Light and Dark themes.
    • Created custom pagination indicator drawables.
  • Header Actions: Added a new quick-access FAQ/Help icon to the top app header.
  • Layout Refinements:
    • Fixed alignment issues with the autoSimWarningText badge inside view_execution_card.xml.
    • Polished the padding, radius, and scroll boundaries of the Diagnostic Report dialog for improved readability.
  • Vector Assets: Added several new Material icons (ic_terminal, ic_sim_card, ic_help_outline, etc.) to support the new UI components.

🔧 Diagnostics & Telemetry

  • Deep Error Tracking: Expanded the DiagnosticError model and AppPreferences serialization to capture exitCode, stdout, and exceptionMessage alongside stderr during command execution failures.
  • Report Formatting: Refactored DiagnosticReporter to generate a highly structured text report. Reports now include Device Manufacturer, Model, Android Version, SDK Level, and comprehensive command execution dumps.
  • Command Capture: Modified NetworkTileService to pass full process results to the error logger.

- Modified brand_primary_container from #EADDFF (purple tint) to #F3EDF7 (softer grayish-purple) for better contrast.
- Modified surface_background from #FAF8F5 (warm off-white) to #FDFBFF (cooler, crisper white) to modernize the app's base background.
- Removed unused status_success_text color since the success text color is currently handled inline or elsewhere in the UI.
- Added segmented_separator (#CAC4D0) to provide a dedicated color for the vertical divider lines between the segmented control options (like Root | Shizuku).
- Added a new Colorful Accents block containing accent_green, accent_orange, and accent_pink to provide vibrant tints for icons (like the developer person icon) and badges.
- Added a new Cycle Card Custom Tones block containing specific warm/orange color overrides (cycle_card_surface, cycle_segmented_selected, cycle_badge_bg, cycle_segmented_text_selected) to give the Quick Tile Cycle card its distinct warm visual identity.
- Added a new Exec Card Custom Tones block containing specific cool/blue color overrides (exec_accent, exec_card_surface, exec_segmented_selected, exec_segmented_text_selected) to give the Execution Mode card its distinct cool visual identity.
- Modified brand_primary_container from #4F378B (deep purple) to #23212A (dark grayish-purple) for a more muted, elegant dark mode contrast.
- Modified surface_background from #141218 (dark gray) to #000000 (pure black) to improve AMOLED screen battery efficiency and provide a higher contrast canvas.
- Modified card_surface from #211F26 to #141218 to match the darker overall theme.
- Modified card_border from #36343B to #2B2930 for subtler edge highlights on cards.
- Removed unused status_success_text color, as text color logic for status badges is handled efficiently via inline colors or specific badge shapes now.
- Added segmented_separator (#49454F) to provide a dedicated, visible divider line between segmented control tabs (like Root | Shizuku) in dark mode.
- Added a new Colorful Accents block (accent_green, accent_orange, accent_pink) to ensure UI icons and developer graphics remain vibrant against the dark backgrounds.
- Added a new Cycle Card Custom Tones block (cycle_card_surface, cycle_segmented_selected, cycle_badge_bg, cycle_segmented_text_selected) bringing dark, warm/orange variants to the Quick Tile Cycle card so it visually distinguishes itself in dark mode.
- Added a new Exec Card Custom Tones block (exec_accent, exec_card_surface, exec_segmented_selected, exec_segmented_text_selected) bringing dark, cool/blue variants to the Execution Mode card so it visually distinguishes itself in dark mode.
- Changed android:statusBarColor from @color/surface_background to @color/card_surface. This ensures the status bar visually blends with the top header cards and components rather than matching the pure black background, creating a more cohesive, edge-to-edge aesthetic in dark mode.
Changed android:statusBarColor from @color/surface_background to @color/card_surface. This ensures that the status bar visually blends with the top header cards instead of the background, creating a seamless and immersive top edge in light mode.
Created color_segmented_text_exec.xml as a color state selector to dynamically handle text color changes for the Execution Mode and Target SIM radio buttons. It applies the cool blue @color/exec_segmented_text_selected when checked and falls back to @color/segmented_text_unselected when unchecked.
Created color_segmented_text_cycle.xml as a color state selector to dynamically handle text color changes for the Quick Tile Cycle radio buttons. It applies the warm orange @color/cycle_segmented_text_selected when checked and falls back to @color/segmented_text_unselected when unchecked.
- Defines the scalable vector graphic (SVG) foreground layer for the Android adaptive launcher icon.
- Separates the app logo from the background to support system-level icon animations and reshaping.
Mistanely previous commit meesage was wrongy added
- Defines the rounded corner background surface specifically for the newly modularized Execution Mode UI card.
- References the new exec_card_surface color so it can shift between distinct light and dark mode variants.
Creates a standard background shape used for rendering the app icon in non-adaptive contexts or custom UI bounds inside the app.
- Defines the rounded corner background surface specifically for the newly modularized Quick Tile Cycle UI card.
- References the new cycle_card_surface color to give it a distinct warm/orange visual identity.
- Creates the elevated, heavily rounded background shape for the Developer Profile card at the bottom of the scroll view.
- Provides a clean surface that stands out against the main app background.
- Defines the background state selector for the Execution Mode and Target SIM radio buttons.
- Dynamically applies the cool/blue @color/exec_segmented_selected color when the tab is checked, and remains transparent when unchecked.
- Defines the background state selector for the Quick Tile Cycle radio buttons.
- Dynamically applies the warm/orange @color/cycle_segmented_selected color when the tab is checked, and remains transparent when unchecked.
- Provides a fallback rectangular background state selector for segmented tabs.
- Used for radio buttons that need sharper corners rather than fully rounded pill shapes.
- Defines a rectangular bounding box background shape for segmented control groups.
- Serves as the outer track for the rectangular segmented tabs.
- Creates a tiny rounded pill shape used as a horizontal separator line.
- Implemented in the Execution card to visually separate the Root/Shizuku block from the Target SIM block.
- Defines the rounded pill background shape specifically for the dynamic "Cycle: 5G Only → 4G Only" text badge.
- Uses the @color/segmented_container color to visually inset the text block against the cycle card's surface.
This generic radio item background was deprecated. We moved to dedicated color-state selectors (selector_segmented_tab_exec.xml and selector_segmented_tab_cycle.xml) to allow tabs to dynamically change their background colors based on whether they belong to the Execution Mode card or the Tile Cycle card.
- Increased corner radius from 16dp to 24dp for a softer, more modern M3 card aesthetic.
- Removed the 1dp solid stroke (border) to rely entirely on elevation/shadows or background contrast for separation rather than harsh outlines.
- Increased internal padding slightly from 14dp to 16dp to give content more breathing room inside the sections.
- Increased the corner radius from 8dp to 50dp for both the checked and unchecked states.
- This transitions the active segmented tab indicator from a slightly rounded rectangle to a fully rounded pill shape, aligning with the latest Material 3 button guidelines.
- Increased corner radius from 16dp to 24dp to match the updated app-wide corner rounding aesthetics.
- Removed the 1dp solid stroke (border), allowing the banner to blend more seamlessly into the UI using just its distinct background color (qs_hint_bg).
- Increased the corner radius from 12dp to 50dp.
- This ensures the outer container/track of the segmented control perfectly wraps the newly rounded 50dp inner active tabs.
- Changed the base shape from oval (perfect circle) to rectangle.
- Added a 12dp corner radius to create a soft "squircle" shape rather than a hard circle.
- Removed the 1dp solid stroke (border) to make the social buttons feel flatter and more integrated as modern clickable surfaces.
- Extracted the "Execution Mode" and "Target SIM" cards, replacing their raw XML blocks with a clean <include layout="@layout/view_execution_card" /> tag to match the landscape activity structure.
- Redesigned the top header into a "Custom Action Bar" by wrapping it in a RelativeLayout with a @color/card_surface background and 6dp elevation, blending seamlessly with the status bar.
- Replaced the generic ic_network_bars vector in the header with the actual app icon (ic_launcher_foreground), giving the app strong branding on launch.
- Upgraded the Developer Profile card at the bottom to use the new @drawable/shape_floating_footer background with 12dp elevation and margin adjustments, making it float elegantly above the scroll content.
- Updated the Developer Profile icon to use the new vibrant @color/accent_pink tint.
- Upgraded the card background from the flat outline (section_outline_bg) to an elevated surface (shape_cycle_card_bg with 8dp elevation).
- Expanded the cycle options from a 2x2 grid (4 items) to a 2x3 grid (6 items), adding support for Pref 3G and 2G Only.
- Replaced the standard Android CheckBox buttons (with checkboxes on the left) with a custom "segmented control" UI. Checkboxes now use android:button="@null" and act as clickable pill tabs within a track (shape_segmented_container_rect).
- Applied the new @drawable/selector_segmented_tab_cycle and @color/color_segmented_text_cycle so the selected modes dynamically highlight with a warm/orange background.
- Added visual vertical separator lines (1dp views) between the segmented tabs to clearly define the hit areas.
- Updated the header and footer badges to use the new @drawable/shape_cycle_order_badge and vibrant @color/accent_orange text for better visual hierarchy.
- Extracted the "Execution Mode" and "Target SIM" UI blocks from the main activity into a dedicated, reusable component file.
- Wrapped both sections in a unified LinearLayout using the new elevated @drawable/shape_exec_card_bg background to create a distinct, modern card surface.
- Upgraded the "Root/Shizuku" and "Auto/SIM 1/SIM 2" selectors from basic radio buttons to modern segmented controls using @drawable/shape_segmented_container and the cool/blue @drawable/selector_segmented_tab_exec selectors.
- Added dynamic vertical 1dp separator lines between the segmented tabs to clearly divide the hit areas.
- Added a subtle horizontal pill divider (@drawable/shape_small_divider) to cleanly separate the Execution Mode toggles from the Target SIM toggles within the same card.
- Updated icons within this card to use the distinct cool/blue @color/exec_accent tint for visual grouping.
- Deleted the monolithic, hardcoded XML blocks for the Execution Mode, Target SIM, and Tile Cycle sections.
- Replaced the deleted sections with <include> tags referencing @layout/view_execution_card (Left Column) and @layout/view_tile_cycle_card (Right Column).
- Placed both included cards side-by-side using a horizontal LinearLayout with equal weights (layout_weight="1").
- Set android:layout_height="match_parent" for both included cards to ensure the shorter card dynamically stretches to perfectly match the height of the taller card.
- Fixed Material elevation shadow clipping by adding android:clipChildren="false" and android:clipToPadding="false" to the ScrollView and row containers.
- Reorganized the top header to optimize vertical space in landscape mode, shifting the Developer Profile icons and links directly into the top right of the Action Bar area.
- Expanded checkbox variables and bindings to support 6 network modes (Pref 5G/4G/3G and Only 5G/4G/2G).
- Added variables and bindings for the 4 vertical separator lines in the segmented layout.
- Added missing import android.view.View; to support visibility toggling.
- Upgraded the refresh() visibility logic to handle the top row (Preferred modes) independently from the bottom row (Only modes).
- Configured separators to hide dynamically if either of their adjacent horizontally-touching buttons is selected, ensuring the selected tab's colored pill shape doesn't get sliced by a visible divider.
- Changed the status bar color in configureStatusBar() from surface_background to card_surface so it visually blends with the new custom Action Bar layout.
- Added view bindings for the three vertical separators (separatorRootShizuku, separatorAutoSim1, separatorSim1Sim2) used in the Execution Mode and Target SIM segmented controls.
- Implemented updateSeparatorVisibility() to dynamically hide the vertical divider line if either of its adjacent radio buttons is selected, ensuring the colored pill backgrounds are not sliced by visible lines.
- Hooked up the separator visibility logic to fire on initial launch (onCreate) and whenever the user taps a new option (setOnCheckedChangeListener).
- Updated the Telegram support link from https://t.me/dhangofa to the group chat URL https://t.me/dhangofas_projects_chat.
Added an <include layout="@layout/view_error_banner.xml" /> block inside the main scroll view hierarchy to support displaying shell failures to the user.
- Updated the UI controller to expose applyCapabilities() and setAuthorized().
- Added logic to gray out, disable, and uncheck specific network modes (like 5G or 2G) in the cycle selection if the background NetworkCapabilityResolver determines the device/SIM does not support them.
- Updated the Theme.NetToggle parent theme references to ensure custom layout components (like the dialogs and bottom sheets) style correctly across Android versions.
- Added <include layout="@layout/view_error_banner" />
- Added android:id="@+id/targetSimHeaderContainer" attribute in the Target SIM's RelativeLayout
- MainActivity.java uses findViewById(R.id.targetSimHeaderContainer) to dim the text opacity when Root/Shizuku is not authorized
- Updated USA Registry: Added at&t, t-mobile, and dish to reflect the completed 2G/3G shutdowns across all major US networks as of August 2026.
- Added Japan Registry: Created JAPAN_LTE_AND_ABOVE to include docomo, au (KDDI), softbank, and rakuten, reflecting the final termination of Docomo's FOMA network.
- Added Australia Registry: Created AUSTRALIA_LTE_AND_ABOVE to include telstra, optus, and vodafone australia (TPG) following their nationwide 3G switch-offs.
- Added Taiwan Registry: Created TAIWAN_LTE_AND_ABOVE to include chunghwa, taiwan mobile, and far eastone following their mid-2024 shutdowns.
Added Singapore Registry: Created SINGAPORE_LTE_AND_ABOVE to include singtel, starhub, and m1 following their 2024 shutdowns.
- Added South Korea Registry: Created SOUTHKOREA_LTE_AND_ABOVE for lg u+, which is fully LTE/5G (intentionally omitting SK Telecom and KT as they still operate 3G networks).
- Updated Logic Flow: Appended new for loops inside the isLteAndAboveOnly() method to dynamically cross-reference the device's current SIM carrier against all the newly added regional lists.
 - Added 3 carousek page bg color
- Added view_guide_button bg color
- Added 3 carousek page bg color
- Added view_guide_button bg color
- Changed solid color from @color/card_surface to @color/segmented_container.
- Changed top-only 24dp corners to a uniform 28dp radius on all sides.
- Added standard Material icons (ic_terminal, ic_sim_card, ic_help_outline, ic_menu_book, ic_open_in_new).
- Created custom shapes (shape_dot_active, shape_dot_inactive) for the carousel pagination dots.
- Added to show guides based on the current app state
- Implemented the RecyclerView.Adapter logic for the ViewPager2 onboarding flow.
- Designed the individual carousel page layout with title, description, and image components.
- Changed the root background from shape_segmented_container to shape_dialog_bg.
- Replaced the hardcoded padding="20dp" with specific horizontal/vertical paddings.
- Removed the hardcoded 250dp height limit on the ScrollView, changing it to wrap_content with layout_weight="1".
- Added @+id/execModeTitleGroup ID to the title container.
- Updated the layout constraints (added layout_alignParentStart and layout_centerVertical) to align the title group and the autoSimWarningText correctly within the relative layout.
- Removed the hardcoded shape_qs_hint_bg Quick Settings banner.
- Added a new LinearLayout (@+id/setupCarouselContainer) placeholder for the programmatic ViewPager2 carousel.
- Added the faqLink ImageView with the ic_help_outline asset to the header.
- Removed the hardcoded shape_qs_hint_bg Quick Settings banner.
- Added a new LinearLayout (@+id/setupCarouselContainer) placeholder for the programmatic ViewPager2 carousel.
- Added the faqLink ImageView with the ic_help_outline asset to the header.
- Removed the direct error checks and rewrote generateReport() to use a StringBuilder.
- Added a formatted --- NETWORK TOGGLE DIAGNOSTIC REPORT --- header.
- Reformatted the [DEVICE INFO] section to include Manufacturer, Brand, Device, Model, Android Version, and SDK Level.
- Added exitCode, stdout, and exceptionMessage properties to the DiagnosticError data model.
- Updated the class constructor to accept and initialize these new properties.
- Updated setLastError() method signature and SharedPreferences edits to store the new telemetry fields (exit_code, stdout, exception).
- Imported ViewPager2 and SetupCarouselAdapter dependencies.
- Added view variables: setupCarouselPager, setupCarouselContainer, carouselIndicators, and faqLink.
- Replaced the static "Quick Settings Ready" hints with the dynamic Setup Carousel.
- Modified setLastError call to pass complete process details (exitCode, stdout, stderr, and exceptionMessage) instead of just the generic string stderr
implementation("androidx.core:core:1.12.0")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("androidx.viewpager2:viewpager2:1.0.0")
implementation("androidx.core:core:1.12.0")
implementation("androidx.recyclerview:recyclerview:1.3.2")
@Dhangofa
Dhangofa merged commit 0921a48 into main Aug 17, 2026
1 check passed
@Dhangofa
Dhangofa deleted the exp branch August 17, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant