Updated UI and Content Overhaul and Crash fixes#161
Open
Conversation
… view for body fragment
…ith its floating button
…ogic in search view
… Dialog_font text
… results duplication bug, keyboard not being dismissed, search loading icon stuck on screen, bookmark card cut off, search result tabs being clipped
Changed the text in body fragment to expand when display and font size of the display changes
… rest of the app and subchapter.json to remove a duplicate subchapter title
private const val BUILD_VERSION = 12 private const val PENDO_RELEASE_VERSION = "Oct-25-"
…n' into 133-update-android-app-to-target-latest-api-level-and-google-sdks
…d-app-to-target-latest-api-level-and-google-sdks Revert "updated from API 34 to 35 in TB Guide android UI Updates"
- Bump compileSdk and targetSdk to 36 - Update dependencies to latest versions - Implement edge-to-edge layout in MainActivity - Add status bar background view in activity_main.xml - Add support for 16KB page size in gradle.properties
Updated tab container structure to improve appearance when font size is increased
Added logic to automatically expand collapsed dropdowns, tabs, and details elements that contain search results before performing in-page search. Also added a method to collapse expanded sections when clearing the search. Updated custom_action_bar_title.xml to use wrap_content for height with a minimum height of 56dp for better layout flexibility.
Changed the floating notes button margins and constraint to improve positioning. MarginEnd increased to 25dp, marginBottom added, and constraint now aligns to bottom_toolbar instead of search_view_include.
…app-ui-with-new-figma-design Merge the latest UI updates to API level update branch
Replaces removeLast() with removeAt(recentSearches.lastIndex) to remove the last item from the recent searches list, ensuring compatibility
Replaces removeLast() with removeAt(recentSearches.lastIndex) to remove the last item from the recent searches list, ensuring compatibility
…rget-latest-api-level-and-google-sdks 133 update android app to target latest api level and google sdks
…rch new highlight color and prefill search bar in bodyfragment Revised and clarified multiple TB guide HTML pages, including table titles, drug dosing, and clinical recommendations. Updated acknowledgements and welcome statements to reflect 2025 redesign. Improved inline search in BodyFragment to prefill search input, show counters, and ensure WebView search listener is set. Adjusted CSS for tooltip positioning and removed unused icon class. Deleted obsolete Table 18 and renamed Table 19 to Table 18 for Grady Hospital TB Isolation Policy.
Introduces a new FontSizeFragment and related layouts for customizable font size settings. Adds a Georgia TB privacy policy HTML asset and updates navigation, settings, and utility classes to support new features. Minor chapter title correction and various UI improvements for preferences.
Caches subchapters for faster toolbar title updates when navigating via in-page links. Enhances WebView fragment/anchor navigation by scrolling to anchors using JavaScript and updating the toolbar title accordingly. Refactors subchapter link handling to improve bookmark type accuracy and fallback navigation.
Revised chart.json to update table IDs and subchapter references for Grady Hospital TB Isolation Policy. Updated HTML content for laboratory diagnosis and TB treatment to fix formatting, clarify recommendations, and correct/expand ART and TB/HIV co-infection guidelines, including timing and drug interaction details. Adjusted tables and notes for accuracy and consistency with current clinical guidelines.
…n' into new-table-formats-with-tooltips
Added custom CSS for opaque, bottom-positioned tooltips in Table 6 for better visibility. Adjusted tooltip positions for info icons in dosage tables and removed redundant tooltips in the treatment regimens page to reduce clutter and improve user experience.
Reduced the font size of the info icon and increased its width and height in style.css for better visual balance. Also corrected a section reference in the HTML from 'Section II, B' to 'Section II,C' for accuracy.
Fixes table 16 separating steroid dosing for adults and children and other minor fixes on links and content
Introduced OnToolbarBackPressed interface to allow fragments to intercept toolbar back presses. MainActivity now delegates toolbar back events to the current fragment if it implements this interface. BodyFragment implements OnToolbarBackPressed to allow the WebView to handle back navigation if possible, improving navigation UX when browsing web content. Added logging and improved back handling logic in BodyFragment.
Added a sanitizeForFTS function to clean user input before using it in SQLite FTS MATCH queries, preventing malformed expressions and potential crashes when special characters like quotes are entered. Updated search handling to use sanitized input.
Updated clearWebViewSearch() to remove highlight spans injected by search JavaScript in the WebView, ensuring all highlights are cleared when the search is reset. Also commented out an unused PreferenceCategory in root_preferences.xml.
Eliminated custom JavaScript-based highlighting in favor of relying solely on WebView's `findAllAsync` and `expandSectionsWithSearchResults` for consistent search result highlighting and match counts. Also improved `collapseSearchView` to always hide search controls and clear search state, even if not expanded, preventing UI inconsistencies.
Replaced outdated 'aidsinfo.nih.gov' guideline links with updated URLs from clinicalinfo.hiv.gov in relevant HTML pages to ensure references point to the current official source.
Added 'debugSymbolLevel FULL' to the debug build type's NDK configuration to generate complete debug symbols, improving debugging capabilities for native code.
Add guards, error handling, and UI tweaks for the in-page search flow. Verify WebView readiness before calling findAllAsync and wrap calls in try/catch to avoid crashes; delay searches to allow content/sections to expand. Update search UI behavior: always show controls when expanded, show/hide the clear button based on text, reset match counters to 0/0 when cleared, and remove the now-unused showEmptySearchState helper. Enhance clearWebViewSearch with exception handling while removing injected highlights and collapsing expanded sections.
the change in BUILD_VERSION triggers the first_launch() function, which purges the HTML data from the database and reloads it to prevent app crashes when db schema changes
…cyRedirects for managing web content and bookmark redirects
Apply the theme window background to root view groups to ensure consistent app background across screens. Added android:background="?android:attr/windowBackground" to app/src/main/res/layout/activity_main.xml and app/src/main/res/layout/fragment_global_search.xml to avoid visual inconsistencies with different themes.
…apping) (#158) * Fix chapter/table indices in MainFragment Corrects the hardcoded indices used when building the predefined chapter and table lists so the displayed titles map to the intended items. Adjusts chapter index mappings (e.g. Diagnosis/Treatment for Active/LTBI and District TB Coordinators) and table index mappings (IV Therapy, Alternative Regimens, Treatment of Extra-pulmonary, TB drugs in Special Situations) to fix misaligned entries shown in the UI. * Add chart title overrides and use in MainFragment Introduce a title override mechanism so UI titles can be changed without mutating underlying Chart entities. FAMainFirst6ChartAdapter gains a titleOverrides map, setTitleOverrides(overrides), and displayTitle() to pick an overridden title; it updates the button text and drawable based on the displayed title (treats both "All Tables>" and "All Charts>" as the special case). MainFragment now builds chartTitleOverrides (mapping chart IDs to display titles), passes them to the adapter, and adds the original data items to the adapter list instead of copying/mutating chartEntity.chartTitle. Click handling also checks the display title (from overrides or entity) to decide navigation. * Use DB-backed chapter title in SubChapterFragment Set the toolbar title from the DB-backed ChapterEntity and use that resolved entity for navigation. Introduces resolvedChapterEntity in SubChapterFragment and observes viewModel.getChapterInfo(chapterId) to update the action bar. When navigating to BodyFragment, pass the resolvedChapterEntity if available, falling back to the original chapterEntity. Adds FASubChapterViewModel.getChapterInfo(chapterId) which exposes chapterDao().getChapterById(chapterId) as LiveData. * Toggle visibility for search navigation controls
Introduce a process-wide AppInitLock and rework initialization to avoid lifecycle races: move heavy I/O and DB seeding into a suspend purgeAndSeedFromAssets() on FAMainViewModel and run it under AppInitLock.mutex.withLock in MainFragment. Make Database.purgeData() and Repository.purgeData() suspend and use Room transactions (with logging). Add COUNT() queries to DAOs for verification, add helpers to parse asset JSON and extract HTML assets, and rebuild global search inside a single DB transaction. Also add small UI/data-readiness guards and logging in fragments to detect empty lists and remove unsafe GlobalScope usage.
Remove class-level mutable predefined lists and instead build fresh list instances locally before calling adapter.submitList(). This prevents races with AsyncListDiffer/DiffUtil (which run async) that can cause IndexOutOfBoundsException if the same mutable list is cleared/modified. Also adjust the chapter readiness check from it.size < 15 to it.size < 16 and preserve chart title override logic while submitting an immutable list to the chart adapter.
* Update content, CSS and assets for TB guide Multiple content and UI fixes across the app: updated chapter and section titles, copy edits, typo fixes and clarified wording in many HTML pages (including epidemiology references and tables). CSS tweaks to improve layout and tooltip visibility (header flex, table layout, white-space, animation, sizing, and z-index adjustments) and removal of obsolete tooltip overrides. Data updates to chapter.json and chart.json (chart title changes and a new figure entry) and added a diagnostic image asset. Also updated Kotlin DB/UI files (ChartDao, ChartAndSubChapter, MainFragment) and root_preferences.xml to reflect these changes. * Add dynamic link config and content fixes Add BuildConfig field DYNAMIC_LINK_DOMAIN for debug and release and update BodyFragment to use it when building Firebase dynamic links (replace hardcoded DOMAIN_LINK). Also make multiple content corrections across assets: prefix chart title with "Figure 1:", change 'Children less than 5 years' to 'Children less than 6 years' in two tables, hyphenate 'Drug-Susceptible' in a table title, clarify ART timing tooltip text for TB meningitis to require TB meningitis under control and at least two weeks of anti-TB treatment, and update pregnancy/PZA wording and minimum therapy duration for drug-susceptible TB. These are documentation/text fixes and a small runtime config change for dynamic links. * Refactor HTML tables and update content for TB treatment guidelines - Updated chapter titles and image attributes for consistency across multiple HTML pages. - Enhanced tooltip descriptions for clarity in the "When to Start HIV Therapy" and "Recommended Regimens for Treatment" sections. - Added principles and notes regarding drug regimens in pediatric dosage tables for Isoniazid, Rifampin, Ethambutol, and Pyrazinamide. - Improved formatting and structure of tables for better readability and user experience. - Updated last modified dates to reflect the latest revisions. * Adjust tooltip positions in asset HTML pages Update data-tooltip-position attributes across three asset HTML pages to correct tooltip alignment and spacing. Changes: set tooltip positions to tooltip-bottom-center-center and tooltip-bottom-right where appropriate, and remove stray non-breaking/extra whitespace in the TB/HIV tooltip text. These tweaks fix tooltip placement and display in the affected pages. * Skip highlighting inside HTML tags; strip styles Prevent highlighting from corrupting existing HTML and remove non-text nodes when parsing assets. In GlobalSearchFragment.highlightText the highlight color is computed once and the regex was changed to preserve existing <...> tags (only wrapping matches outside tags with a highlight span). In Methods.html2text Jsoup now removes <style> and <script> elements before extracting text to avoid including non-visible content. * Add settings footer with AppHatchery logo Add a bottom footer to the settings screen containing the AppHatchery logo and version text. * Bump versionName and add dynamic settings footer Update build.gradle to set versionName to "2.0". Modify SettingsFragment to populate footer TextViews at runtime with the app's actual version (from packageManager) and the current year (using Calendar) * Adding Build number to version string - Including the version build number to the version string on the settings page * Bump AndroidX & Firebase dependency versions Update multiple dependencies in app/build.gradle: androidx.core:core-ktx -> 1.18.0, firebase-crashlytics -> 20.0.4, firebase-analytics -> 23.2.0, and pendoIO -> 3.11.3.8950. These are minor/patch upgrades to incorporate bug fixes and compatibility improvements. * Update last-updated dates and district contacts Bump "Last Updated" timestamps from October 2025 to April 2026 across multiple HTML pages. Major overhaul of XV Appendix: District TB Coordinators — HTML formatting cleanup, table header updated to include medical consultants, and many contact records refreshed (added/updated backup contacts, medical consultants, phone numbers and emails). Miscellaneous formatting improvements in the appendix table. --------- Co-authored-by: Wiza Munthali <wizamunthali@gmail.com>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
This was referenced Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GATB Reference Guide v2.0 — Major Overhaul
Summary
Full-scale overhaul of the Android app covering UI, content, search, notes, bookmarks, and infrastructure.
Key Highlights
UI Redesign
Screenshots
Layouts
Search Improvements
WebView Search
Notes
NoteTargetRowfor migration supportBookmarks
DAO Updates
Enhancements
Content Updates
Tables & Tooltips
JS
activateTab())CSS
Fix
Data & Stability
Build & Infrastructure
Other
Test Plan