Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Fullscreen working great, but splitscreen not resizing to it's visible bounds.

Aperta
#12 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
android, kotlin
Ambito
mobile-dev

Direzione di ricerca

Inizia riproducendo l'app di esempio nelle modalità a schermo intero e a schermo diviso, quindi traccia onSurfaceAvailable, onStableAreaChanged e le chiamate di MapRenderer a mapContainer.setSurfaceSize. Confronta le dimensioni dell'area stabile con i limiti visibili di MapView in entrambe le transizioni. Il lavoro è completato quando la mappa viene ridimensionata e rimane centrata entrando e uscendo dallo schermo diviso, senza compromettere lo schermo intero.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Does your splitscreen automatically resize with this demo's codebase? If so, can someone point to what is causing the MapView to resize?

I don't see my map resizing when transitioning from splitscreen. I have the sample app working in fullscreen mode and in splitscreen the MapView doesn't resize and the map is therefore not centered in the split layout.

I see that nothing interesting happens in the onStableAreaChanged callback, and it seems mapContainer.setSurfaceSize is only ever called with w=800 and h=400 from the initial onSurfaceAvailable callback in MapRenderer. I would assume, and I have tried, that the setSurfaceSize would be called after the app receives a new layout size in onStableAreaChanged. But i'm reading the the width and height of the Rect in onStableAreaChanged excludes the system UI components like the zoom, hamburger menu, and Test button. But the map is behind those system UI components.

So now i'm confused and unsure if this demo actually accomplishes the resizing.

I've tried setting the mapContainer.setSurfaceSize to stableArea.width() + stableArea.right and stableArea.height() + stableArea.top in the onStableAreaChanged, and this works for splitscreen, but going back to fullscreen it causes issues with not receiving the proper dimensions. It's also seen in the screenshots that the mapView is outside the "stableArea" (the stablearea has a blue rect drawn)

I must be missing something here. Obviously I can store the initial width and height from onSurfaceAvailable surfaceContainer, and revert back when the layout size change, and leep track of what's the biggest layout size, But I don't like that.

Image Image
Lingua principale
Kotlin
Stelle
30
Fork
10
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di maplibre/MapLibre-Android-Auto-Sample

Tutte le issue di maplibre/MapLibre-Android-Auto-Sample

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.