Skip to content

Make UI adaptive, fix edge-to-edge IME insets, enable R8 for release#1

Merged
jpcottin merged 2 commits into
masterfrom
adaptive-layout-edge-to-edge-r8
May 22, 2026
Merged

Make UI adaptive, fix edge-to-edge IME insets, enable R8 for release#1
jpcottin merged 2 commits into
masterfrom
adaptive-layout-edge-to-edge-r8

Conversation

@jpcottin
Copy link
Copy Markdown
Owner

@jpcottin jpcottin commented May 22, 2026

Summary

  • Adaptive layout: LazyColumnLazyVerticalGrid(GridCells.Adaptive(300.dp)) — 1 column on phones, 2 on unfolded foldables, 3 on tablets, zero breakpoint boilerplate
  • Edge-to-edge IME fix: replaced Modifier.safeDrawingPadding() on the nav entry (missed IME) with Scaffold(contentWindowInsets = WindowInsets.safeDrawing) + consumeWindowInsets inside MainScreen; the keyboard now correctly lifts content when the magnet-link field is focused
  • R8 for release: enabled isMinifyEnabled + isShrinkResources; added proguard-rules.pro with targeted keep rules for JNI native methods (TorrentManager) and @Serializable data classes

Test plan

  • All 14 Compose UI instrumented tests pass on Resizable API-37 AVD (./gradlew connectedAndroidTest)
  • JVM unit tests pass (./gradlew testDebugUnitTest)
  • Visual check in phone, unfolded, and tablet window sizes via adb emu resize-display 0/1/2
  • Debug APK builds clean (./gradlew assembleDebug)
  • Release APK builds and R8 keep rules verified (./gradlew assembleRelease) — run locally before merging

jpcottin added 2 commits May 21, 2026 22:46
Adaptive layout
- Convert LazyColumn → LazyVerticalGrid(GridCells.Adaptive(300.dp)) so
  the torrent list reflows into 2 columns on unfolded foldables and 3
  on tablets automatically, with no breakpoint boilerplate.

Edge-to-edge
- Replace Modifier.safeDrawingPadding() on the NavDisplay entry (which
  missed IME insets) with Scaffold(contentWindowInsets =
  WindowInsets.safeDrawing) inside MainScreen. The soft keyboard now
  correctly pushes content up when the magnet-link field is focused.
- consumeWindowInsets(innerPadding) prevents child composables from
  double-applying system-bar insets.

R8 / release shrinking
- Enable isMinifyEnabled = true and isShrinkResources = true for the
  release build type.
- Add proguard-rules.pro with targeted keep rules for JNI native
  methods (TorrentManager) and @serializable data classes (TorrentInfo,
  PeerInfo) so R8 does not rename or strip them.

All 14 Compose UI instrumented tests pass on a Resizable API-37 AVD;
phone, unfolded, and tablet window sizes verified visually.
@jpcottin jpcottin merged commit 5d5fa3c into master May 22, 2026
8 checks passed
@jpcottin jpcottin deleted the adaptive-layout-edge-to-edge-r8 branch May 22, 2026 05:55
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