tilfluktsrom/app/src/main/res/layout/item_shelter.xml
Ole-Morten Duesund 27cad094e7 Initial commit: Norwegian emergency shelter finder app
Android app (Kotlin) that locates the nearest public shelter (tilfluktsrom)
in Norway. Designed for offline-first emergency use.

Features:
- Downloads and caches all 556 Norwegian shelter locations from Geonorge
- GPS-based nearest shelter finding with distance and bearing
- OSMDroid map with offline tile caching for surroundings
- Large directional compass arrow pointing to selected shelter
- Compass sensor integration for real-time direction updates
- Shows 3 nearest shelters with distance, capacity, and address
- Toggle between map view and compass/arrow view
- Auto-caches map tiles on first launch for offline use
- Weekly background data refresh with manual force-update
- i18n: Norwegian Bokmål, Nynorsk, and English

Technical:
- EPSG:25833 (UTM33N) → WGS84 coordinate conversion
- Haversine distance and bearing calculations
- Room database for shelter persistence
- Fused Location Provider for precise GPS
- Sensor fusion (rotation vector with accel+mag fallback) for compass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:14:19 +01:00

54 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="8dp">
<TextView
android:id="@+id/shelterAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_primary"
android:textSize="14sp"
android:textStyle="bold"
tools:text="Storgata 1 - Bunker (off)" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/shelterDistance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/shelter_primary"
android:textSize="13sp"
android:textStyle="bold"
tools:text="1.2 km" />
<TextView
android:id="@+id/shelterCapacity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:textColor="@color/text_secondary"
android:textSize="12sp"
tools:text="400 plasser" />
<TextView
android:id="@+id/shelterRoomNr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:textColor="@color/text_secondary"
android:textSize="12sp"
tools:text="Rom 776" />
</LinearLayout>
</LinearLayout>