Commit Graph

15 Commits

Author SHA1 Message Date
Fernando López Guevara
6ee2b28e70 media: handle upload on android 2025-08-26 17:10:38 -07:00
William Casarin
77ac91e810 Implement soft keyboard visibility on Android
- Added `SoftKeyboardContext` enum and support for calculating keyboard
  insets from both virtual and platform sources

- Updated `AppContext` to provide `soft_keyboard_rect` for determining
  visible keyboard area

- Adjusted UI rendering to shift content when input boxes intersect with
  the soft keyboard, preventing overlap

- Modified `MainActivity` and Android manifest to use
  `windowSoftInputMode="adjustResize"` and updated window inset handling

- Introduced helper functions (`include_input`, `input_rect`,
  `clear_input_rect`) in `notedeck_ui` for tracking focused input boxes

- Fixed Android JNI keyboard height reporting to clamp negative values

Together, these changes allow the app to correctly detect and respond
to soft keyboard visibility on Android, ensuring input fields remain
accessible when typing.

Fixes: https://github.com/damus-io/notedeck/issues/946
Fixes: https://github.com/damus-io/notedeck/issues/1043
2025-08-19 11:29:45 -07:00
William Casarin
cb72592f4b android: fix dark/light mode and folding screen crash
We have to tell android not to restart the activity when a dark/light
mode is switched or when the phone is folded/unfolded. Otherwise
it will crash.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-07 16:27:29 -07:00
Fernando López Guevara
f282363748 feat(notedeck): add cross-platform URI opener 2025-07-30 16:27:51 -07:00
William Casarin
e2295172a2 fix target sdk
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-14 16:15:29 -07:00
William Casarin
45bb00426f andriod: add app icons
Fixes: #958
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-14 16:02:49 -07:00
William Casarin
3a25f3b245 tweak minSdk
24 is lowest vulkan ... so target that

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-14 16:01:48 -07:00
William Casarin
505083998d android: fix build
wip android keyboard fixes

wip 4.0.0 game-activity

Signed-off-by: William Casarin <jb55@jb55.com>
2025-06-16 16:11:51 -07:00
William Casarin
bd85233120 android: capture current keyboard height
expose a new virtual_keyboard_height function under notedeck::platform::android

which gets the current height of the virtual keyboard. We can use this
to tranlate the view out of the way

Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-11 10:53:13 -07:00
William Casarin
a168a38760 android: misc testing
Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-11 10:52:29 -07:00
William Casarin
51457a0260 android: update to latest winit/egui/android-activity
so we can start fixing this shit

Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-11 10:51:56 -07:00
William Casarin
da9b2bcd46 android: 0.30.0 game activity
still no text input, at least it's not crashing

Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-11 10:47:32 -07:00
William Casarin
b21e39dea9 android: get GameActivity to launch
For some reason there are no touch inputs though

Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-11 10:47:32 -07:00
William Casarin
9ce2b4da2c remove extra crap from manifest
still not launching, thought this might have been why. nope

Signed-off-by: William Casarin <jb55@jb55.com>
2025-03-11 10:47:32 -07:00
William Casarin
5d4548d3f7 Switch to GameActivity and gradle build
Fixes: https://github.com/damus-io/notedeck/issues/189
Fixes: https://github.com/damus-io/notedeck/issues/190
Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-27 17:31:28 -08:00