Skip to content

Fix crashes on Android 9/10, organize save, links, text drag; trim ma… - #90

Merged
Chethan616 merged 3 commits into
mainfrom
v5.2
Oct 16, 2026
Merged

Chethan616 merged 3 commits into
mainfrom
v5.2

Conversation

@Chethan616

@Chethan616 Chethan616 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

…rgins, book mode, save a copy

  • [Bug]: App crashed when click any buttons #80: glass buttons crashed on Android 12 and older. The press glow's lazy RuntimeShader property cast to a class that only exists on Android 13+. RuntimeShader now lives in an API 33 object. The press transform and tab bar also skip zero sizes, because the NaN scale they produced crashed Android 9's View layers.
  • [Bug]: Organized Option #89: organize, merge and extract saved after closing the source document. importPage shares the source's fonts and images, so any PDF with them failed ("COSStream has been closed"). Sources now stay open until the save, and a failed organize removes its empty output.
  • [Bug]: Dragging inserted text also pans the PDF #88: dragging a placed text box no longer pans the page. A one-finger pan waits for touch slop and leaves alone a drag that a page child consumed.
  • [Bug]: Hyperlinks in pdf don't work #83: PDF links work. Web and mail links open in their app, and jumps inside the document scroll to the target page and position. They are read with the form fields in one PdfBox pass.
  • [Feature]: Autocrop empty space in pdf #85: Settings > Appearance > Trim page margins. One content rect is measured across the document, and pages are laid out wider and clipped, so overlays keep their coordinates.
  • [Feature]: Horizontal book mode for pdfs #84: Settings > Appearance > Book mode. Each page fits the screen. A fling or a sideways swipe turns exactly one page.
  • [Feature]: Save an opened PDF to the device as an unmodified copy #76: Share has a Save a copy action. It writes the chosen format wherever the user picks, and keeps the file's own name when nothing was edited.
  • The bar ink sampler reads the real page frame, so book mode's letterbox no longer gets dark icons.

What changed?

Why?

Closes #

How was it checked?

  • ./gradlew :app:assembleFossDebug
  • Relevant manual checks completed
  • Device / Android version:
  • Known limitations:

Screenshots or recording

Checklist

  • Selected documents remain local; any new network behavior is explicit and documented.
  • Existing offline workflows remain usable where intended.
  • Light and dark themes, accessibility, and performance were considered.
  • Documentation and third-party notices were updated where needed.
  • No secrets, private documents, APKs, keystores, or build outputs are included.

…rgins, book mode, save a copy

- #80: glass buttons crashed on Android 12 and older. The press glow's lazy
  RuntimeShader property cast to a class that only exists on Android 13+.
  RuntimeShader now lives in an API 33 object. The press transform and tab bar
  also skip zero sizes, because the NaN scale they produced crashed Android 9's
  View layers.
- #89: organize, merge and extract saved after closing the source document.
  importPage shares the source's fonts and images, so any PDF with them failed
  ("COSStream has been closed"). Sources now stay open until the save, and a
  failed organize removes its empty output.
- #88: dragging a placed text box no longer pans the page. A one-finger pan
  waits for touch slop and leaves alone a drag that a page child consumed.
- #83: PDF links work. Web and mail links open in their app, and jumps inside
  the document scroll to the target page and position. They are read with the
  form fields in one PdfBox pass.
- #85: Settings > Appearance > Trim page margins. One content rect is measured
  across the document, and pages are laid out wider and clipped, so overlays
  keep their coordinates.
- #84: Settings > Appearance > Book mode. Each page fits the screen. A fling or
  a sideways swipe turns exactly one page.
- #76: Share has a Save a copy action. It writes the chosen format wherever the
  user picks, and keeps the file's own name when nothing was edited.
- The bar ink sampler reads the real page frame, so book mode's letterbox no
  longer gets dark icons.
Book mode put the reader's icons over the dark letterbox while the bar's ink
still came from the page, so they stayed black on black. One ink per bar also
meant a circle over a photo or a page edge followed its neighbours, not its
own background.

- ProvideScreenInk (Android 8+) copies the window, scaled down, a few times a
  second, and only after the window has drawn something new.
- Each control reads that copy through rememberAdaptiveInk: the corners of its
  own box (outside the glass) plus the sides level with its glyph, with
  hysteresis. The bar's old ink is the fallback, which Android 7 and older
  still use.
- This covers the PDF/PPT top bar and reader row, the Word editor header and
  reading controls, the spreadsheet header and share button, and the shared
  find bar.
@Chethan616

Chethan616 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner Author

Dragging the inserted text when dragged to an another page goes behind of the render instead above the render need to fix this
Remaining all are fixed.

@Chethan616
Chethan616 merged commit d0e5a58 into main Oct 16, 2026
2 checks passed
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