summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/res
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-05-15 20:32:22 +0000
committerClaude <noreply@anthropic.com>2026-05-15 21:25:54 +0000
commitbaa07bc5c062d4f358e8c655260bf32810184634 (patch)
treec2698d415ec210108f3aed20fa3e3662c0859230 /android-app/app/src/main/res
parent555483b7248b0cb75bb9ed83b47880349f0c6ee0 (diff)
fix: saved tracks browser, GPX import persistence
Saved tracks browser: - TrackDetailSheet converted from BottomSheetDialogFragment to Fragment so it fills the overlay instead of floating over the map - Adapter tap pushes detail fragment onto the back stack; back button returns to the list naturally via popBackStack() - SavedTracksFragment back button calls hideOverlays() (made internal) to close the overlay and return to the map - Layout updated to full-screen: header with back button, RecyclerView fills remaining space via layout_weight instead of fixed 300dp GPX import persistence: - TrackRepository.importTrack() saves parsed points to Documents/Nav/ via TrackStorage (URI is persisted to SharedPreferences) and adds to in-memory list - MainViewModel.addImportedTrack() now calls importTrack() so files opened via the GPX handler load on future launches https://claude.ai/code/session_01DNjbYxiC1cco83dArNGW3G
Diffstat (limited to 'android-app/app/src/main/res')
-rw-r--r--android-app/app/src/main/res/layout/layout_track_detail_sheet.xml58
1 files changed, 36 insertions, 22 deletions
diff --git a/android-app/app/src/main/res/layout/layout_track_detail_sheet.xml b/android-app/app/src/main/res/layout/layout_track_detail_sheet.xml
index 9b2eb30..6a2ba50 100644
--- a/android-app/app/src/main/res/layout/layout_track_detail_sheet.xml
+++ b/android-app/app/src/main/res/layout/layout_track_detail_sheet.xml
@@ -2,34 +2,47 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:orientation="vertical"
- android:paddingBottom="16dp">
+ android:background="?attr/colorSurface">
- <!-- drag handle -->
- <View
- android:layout_width="40dp"
- android:layout_height="4dp"
- android:layout_gravity="center_horizontal"
- android:layout_marginTop="8dp"
- android:layout_marginBottom="8dp"
- android:background="#BDBDBD" />
-
- <TextView
- android:id="@+id/detail_title"
+ <!-- Header -->
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingHorizontal="20dp"
- android:paddingBottom="12dp"
- android:textSize="17sp"
- android:textStyle="bold" />
+ android:layout_height="56dp"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:paddingStart="8dp"
+ android:paddingEnd="16dp"
+ android:elevation="4dp"
+ android:background="?attr/colorSurface">
- <!-- stats row: distance · duration · max · avg -->
+ <ImageButton
+ android:id="@+id/btn_back"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:src="@drawable/ic_back"
+ android:background="?attr/selectableItemBackgroundBorderless"
+ android:contentDescription="Back" />
+
+ <TextView
+ android:id="@+id/detail_title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:textSize="17sp"
+ android:textStyle="bold"
+ android:layout_marginStart="4dp" />
+
+ </LinearLayout>
+
+ <!-- Stats row: distance · duration · max · avg -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingHorizontal="12dp"
+ android:paddingTop="12dp"
android:paddingBottom="12dp">
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content"
@@ -69,7 +82,6 @@
<View android:layout_width="match_parent" android:layout_height="1dp"
android:background="?attr/colorOutlineVariant" android:layout_marginHorizontal="16dp" />
- <!-- event log -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -85,7 +97,9 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_log_entries"
android:layout_width="match_parent"
- android:layout_height="300dp"
- android:nestedScrollingEnabled="true" />
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:clipToPadding="false"
+ android:paddingBottom="24dp" />
</LinearLayout>