summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/res/layout
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-05-26 05:13:48 +0000
committerClaude <noreply@anthropic.com>2026-05-26 05:13:48 +0000
commite34df09b96f4ded3c25c5a14a0332a874205b64a (patch)
treef510434fa59ad8221d2f74cfc986fcc8d12a0433 /android-app/app/src/main/res/layout
parentd35410c707900075bf4207bab518ead44d43c6e7 (diff)
Add notes to finished tracks, single Nav voice, fix speed coloring
- TrackDetailSheet: + Add note button opens a dialog with text, camera, and gallery. Entry is saved with timestampMs=track.endMs so it lands inside the track's time window and appears automatically in the event log. logEventAdapter.update() refreshes the list after save. - TripReportGenerator: removed NarrativeStyle enum and 4-style branch. generateNarrative() now emits a concise PASSAGE header (date, time range, duration), stats line (nm / avg kt / max kt), optional conditions (seas, temp), and a timestamped deck log. Fragment and layout updated to remove the ChipGroup style picker. - TrackColors: replaced Expression.get("color") — which silently fails for lineColor on LineLayer in MapLibre Android 11.x — with Expression.step(Expression.get("speed"), ...) that maps the numeric "speed" property directly to color literals. "color" string property removed from speedSegments() features. https://claude.ai/code/session_01YUbuZNDAoLea4cf9UGQ9qn
Diffstat (limited to 'android-app/app/src/main/res/layout')
-rw-r--r--android-app/app/src/main/res/layout/dialog_add_track_note.xml69
-rw-r--r--android-app/app/src/main/res/layout/fragment_trip_report.xml62
-rw-r--r--android-app/app/src/main/res/layout/layout_track_detail_sheet.xml35
3 files changed, 102 insertions, 64 deletions
diff --git a/android-app/app/src/main/res/layout/dialog_add_track_note.xml b/android-app/app/src/main/res/layout/dialog_add_track_note.xml
new file mode 100644
index 0000000..639a27a
--- /dev/null
+++ b/android-app/app/src/main/res/layout/dialog_add_track_note.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="16dp">
+
+ <EditText
+ android:id="@+id/et_note_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="Note"
+ android:minLines="3"
+ android:gravity="top|start"
+ android:inputType="textMultiLine"
+ android:padding="8dp" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_marginTop="12dp">
+
+ <Button
+ android:id="@+id/btn_note_camera"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="Camera"
+ android:layout_marginEnd="4dp" />
+
+ <Button
+ android:id="@+id/btn_note_gallery"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="Gallery"
+ android:layout_marginStart="4dp" />
+
+ </LinearLayout>
+
+ <FrameLayout
+ android:id="@+id/frame_note_photo"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:visibility="gone">
+
+ <ImageView
+ android:id="@+id/iv_note_photo"
+ android:layout_width="match_parent"
+ android:layout_height="120dp"
+ android:scaleType="centerCrop"
+ android:contentDescription="Selected photo" />
+
+ <Button
+ android:id="@+id/btn_note_remove_photo"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top|end"
+ android:layout_margin="4dp"
+ android:text="✕"
+ android:textSize="10sp"
+ android:paddingHorizontal="6dp"
+ android:paddingVertical="2dp" />
+
+ </FrameLayout>
+
+</LinearLayout>
diff --git a/android-app/app/src/main/res/layout/fragment_trip_report.xml b/android-app/app/src/main/res/layout/fragment_trip_report.xml
index 1ce0bde..7228fa9 100644
--- a/android-app/app/src/main/res/layout/fragment_trip_report.xml
+++ b/android-app/app/src/main/res/layout/fragment_trip_report.xml
@@ -14,61 +14,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Trip Narrative"
+ android:text="Trip Report"
android:textSize="24sp"
android:textStyle="bold"
- android:layout_marginBottom="16dp" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Choose Narrative Style:"
- android:textSize="14sp"
- android:layout_marginBottom="8dp" />
-
- <HorizontalScrollView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="24dp">
-
- <com.google.android.material.chip.ChipGroup
- android:id="@+id/chip_group_styles"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:singleSelection="true"
- app:selectionRequired="true">
-
- <com.google.android.material.chip.Chip
- android:id="@+id/chip_professional"
- style="@style/Widget.Material3.Chip.Filter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Professional"
- android:checked="true" />
-
- <com.google.android.material.chip.Chip
- android:id="@+id/chip_adventurous"
- style="@style/Widget.Material3.Chip.Filter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Adventurous" />
-
- <com.google.android.material.chip.Chip
- android:id="@+id/chip_journal"
- style="@style/Widget.Material3.Chip.Filter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Journal" />
-
- <com.google.android.material.chip.Chip
- android:id="@+id/chip_pirate"
- style="@style/Widget.Material3.Chip.Filter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Pirate" />
-
- </com.google.android.material.chip.ChipGroup>
- </HorizontalScrollView>
+ android:layout_marginBottom="24dp" />
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
@@ -88,8 +37,9 @@
android:id="@+id/tv_narrative_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="Generate a report to see your story..."
- android:textSize="16sp"
+ android:text="Generate a report to see your passage summary…"
+ android:textSize="15sp"
+ android:fontFamily="monospace"
android:lineSpacingExtra="4dp" />
</LinearLayout>
@@ -100,7 +50,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="24dp"
- android:text="REFRESH REPORT" />
+ android:text="GENERATE REPORT" />
<ProgressBar
android:id="@+id/progress_report"
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 993edf8..4a77a36 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
@@ -97,17 +97,36 @@
<View android:layout_width="match_parent" android:layout_height="1dp"
android:background="?attr/colorOutlineVariant" android:layout_marginHorizontal="16dp" />
- <TextView
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingHorizontal="20dp"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:paddingStart="20dp"
+ android:paddingEnd="8dp"
android:paddingTop="8dp"
- android:paddingBottom="4dp"
- android:text="Event Log"
- android:textSize="13sp"
- android:textAllCaps="true"
- android:letterSpacing="0.08"
- android:textColor="?attr/colorOnSurfaceVariant" />
+ android:paddingBottom="4dp">
+
+ <TextView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="Event Log"
+ android:textSize="13sp"
+ android:textAllCaps="true"
+ android:letterSpacing="0.08"
+ android:textColor="?attr/colorOnSurfaceVariant" />
+
+ <Button
+ android:id="@+id/btn_add_note"
+ style="?attr/borderlessButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="+ Add note"
+ android:textSize="12sp"
+ android:paddingHorizontal="8dp" />
+
+ </LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_log_entries"