diff options
| author | Claude <noreply@anthropic.com> | 2026-05-30 08:19:46 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-05-30 08:19:46 +0000 |
| commit | 994ddaf2ec8d8aace4fef72a214df31e6ef134ef (patch) | |
| tree | 8b2c228ec341d1017bd11595cd10d5627429a183 /android-app/app/src/main/res/layout | |
| parent | 2b6a7599b3a9b0159ac3f45917e6e5d77841328c (diff) | |
Trip report: map, photos, structured layout, preferred units
Replaces monospace text block with:
- Full-bleed MapLibre track map (260dp) at the top
- Structured stats row (distance / avg speed / max speed)
- Conditions row (wave height, temp) in user-preferred units
- Log entries with full-width photo thumbnails
- Pirate mode Easter egg preserved via long-press title
- Speed, temp, and depth formatted with UnitPrefs
https://claude.ai/code/session_01KXYBuAHZkvv63DeUG6XaZD
Diffstat (limited to 'android-app/app/src/main/res/layout')
| -rw-r--r-- | android-app/app/src/main/res/layout/fragment_trip_report.xml | 326 |
1 files changed, 172 insertions, 154 deletions
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 ec3f58e..5df8938 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 @@ -3,220 +3,238 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/colorSurface"> + android:background="?attr/colorSurface" + android:fillViewport="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="24dp"> + android:orientation="vertical"> - <TextView - android:id="@+id/tv_report_title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Trip Report" - android:textSize="24sp" - android:textStyle="bold" - android:layout_marginBottom="20dp" - android:longClickable="true" /> + <!-- Full-bleed track map at the top, no margin/padding --> + <org.maplibre.android.maps.MapView + android:id="@+id/report_map_view" + android:layout_width="match_parent" + android:layout_height="260dp" /> - <!-- Structured content (hidden in pirate mode) --> + <!-- Padded scrollable content below the map --> <LinearLayout - android:id="@+id/layout_structured_content" + android:id="@+id/layout_scrollable_content" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:visibility="gone"> - - <!-- Passage header: date + time range --> - <TextView - android:id="@+id/tv_passage_date" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textSize="13sp" - android:textAllCaps="true" - android:letterSpacing="0.1" - android:alpha="0.6" - android:layout_marginBottom="2dp" /> + android:padding="20dp"> <TextView - android:id="@+id/tv_passage_time" + android:id="@+id/tv_report_title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="17sp" - android:layout_marginBottom="20dp" /> + android:text="Trip Report" + android:textSize="24sp" + android:textStyle="bold" + android:longClickable="true" + android:layout_marginBottom="16dp" /> - <!-- Stats row: distance · avg · max --> + <!-- Structured content (hidden in pirate mode) --> <LinearLayout + android:id="@+id/layout_structured_content" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_marginBottom="16dp"> + android:orientation="vertical" + android:visibility="gone"> + + <!-- Passage header: date + time range --> + <TextView + android:id="@+id/tv_passage_date" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="13sp" + android:textAllCaps="true" + android:letterSpacing="0.1" + android:alpha="0.6" + android:layout_marginBottom="2dp" /> + + <TextView + android:id="@+id/tv_passage_time" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="17sp" + android:layout_marginBottom="20dp" /> + <!-- Stats row: distance · avg · max --> <LinearLayout - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:gravity="center_horizontal"> - <TextView - android:id="@+id/tv_stat_distance" - android:layout_width="wrap_content" + android:orientation="horizontal" + android:layout_marginBottom="16dp"> + + <LinearLayout + android:layout_width="0dp" android:layout_height="wrap_content" - android:textSize="34sp" - android:textStyle="bold" /> - <TextView - android:layout_width="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center_horizontal"> + <TextView + android:id="@+id/tv_stat_distance" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="34sp" + android:textStyle="bold" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="nm" + android:textSize="11sp" + android:alpha="0.55" /> + </LinearLayout> + + <LinearLayout + android:layout_width="0dp" android:layout_height="wrap_content" - android:text="nm" - android:textSize="11sp" - android:alpha="0.55" /> + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center_horizontal"> + <TextView + android:id="@+id/tv_stat_avg" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="34sp" + android:textStyle="bold" /> + <TextView + android:id="@+id/tv_label_avg" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="avg kt" + android:textSize="11sp" + android:alpha="0.55" /> + </LinearLayout> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center_horizontal"> + <TextView + android:id="@+id/tv_stat_max" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="34sp" + android:textStyle="bold" /> + <TextView + android:id="@+id/tv_label_max" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="max kt" + android:textSize="11sp" + android:alpha="0.55" /> + </LinearLayout> + </LinearLayout> + <!-- Conditions row (seas / temp) — hidden if no data --> <LinearLayout - android:layout_width="0dp" + android:id="@+id/layout_conditions" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:gravity="center_horizontal"> - <TextView - android:id="@+id/tv_stat_avg" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textSize="34sp" - android:textStyle="bold" /> + android:orientation="horizontal" + android:layout_marginBottom="20dp" + android:visibility="gone"> + <TextView + android:id="@+id/tv_conditions" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="avg kt" - android:textSize="11sp" - android:alpha="0.55" /> + android:textSize="14sp" + android:alpha="0.7" /> + </LinearLayout> + <!-- Divider before log --> + <View + android:id="@+id/divider_log" + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="?attr/colorOutlineVariant" + android:visibility="gone" /> + + <!-- Log entries — hidden if none --> <LinearLayout - android:layout_width="0dp" + android:id="@+id/layout_log_section" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" android:orientation="vertical" - android:gravity="center_horizontal"> - <TextView - android:id="@+id/tv_stat_max" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textSize="34sp" - android:textStyle="bold" /> + android:layout_marginTop="16dp" + android:visibility="gone"> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="max kt" + android:text="LOG" android:textSize="11sp" - android:alpha="0.55" /> + android:textAllCaps="true" + android:letterSpacing="0.12" + android:alpha="0.5" + android:layout_marginBottom="8dp" /> + + <LinearLayout + android:id="@+id/ll_log_entries" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> + </LinearLayout> </LinearLayout> - <!-- Conditions row (seas / temp) — hidden if no data --> - <LinearLayout - android:id="@+id/layout_conditions" + <!-- Pirate mode: monospace narrative card --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/cv_pirate" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_marginBottom="20dp" + app:cardCornerRadius="16dp" + app:cardElevation="0dp" + app:strokeWidth="1dp" + app:strokeColor="?attr/colorOutlineVariant" android:visibility="gone"> <TextView - android:id="@+id/tv_conditions" - android:layout_width="wrap_content" + android:id="@+id/tv_narrative_content" + android:layout_width="match_parent" android:layout_height="wrap_content" + android:padding="16dp" android:textSize="14sp" - android:alpha="0.7" /> + android:fontFamily="monospace" + android:lineSpacingExtra="4dp" /> - </LinearLayout> + </com.google.android.material.card.MaterialCardView> - <!-- Divider before log --> - <View - android:id="@+id/divider_log" + <!-- Error state --> + <TextView + android:id="@+id/tv_error" android:layout_width="match_parent" - android:layout_height="1dp" - android:background="?attr/colorOutlineVariant" + android:layout_height="wrap_content" + android:textSize="14sp" + android:alpha="0.7" + android:layout_marginBottom="16dp" android:visibility="gone" /> - <!-- Log entries — hidden if none --> - <LinearLayout - android:id="@+id/layout_log_section" + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_retry" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:layout_marginTop="16dp" - android:visibility="gone"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="LOG" - android:textSize="11sp" - android:textAllCaps="true" - android:letterSpacing="0.12" - android:alpha="0.5" - android:layout_marginBottom="8dp" /> - - <LinearLayout - android:id="@+id/ll_log_entries" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" /> - - </LinearLayout> - - </LinearLayout> - - <!-- Pirate mode: monospace narrative card --> - <com.google.android.material.card.MaterialCardView - android:id="@+id/cv_pirate" - android:layout_width="match_parent" - android:layout_height="wrap_content" - app:cardCornerRadius="16dp" - app:cardElevation="0dp" - app:strokeWidth="1dp" - app:strokeColor="?attr/colorOutlineVariant" - android:visibility="gone"> + android:text="RETRY" + android:visibility="gone" /> - <TextView - android:id="@+id/tv_narrative_content" - android:layout_width="match_parent" + <ProgressBar + android:id="@+id/progress_report" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="16dp" - android:textSize="14sp" - android:fontFamily="monospace" - android:lineSpacingExtra="4dp" /> - - </com.google.android.material.card.MaterialCardView> - - <!-- Error state --> - <TextView - android:id="@+id/tv_error" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="14sp" - android:alpha="0.7" - android:layout_marginBottom="16dp" - android:visibility="gone" /> - - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_retry" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="RETRY" - android:visibility="gone" /> + android:layout_gravity="center" + android:layout_marginTop="48dp" + android:visibility="gone" /> - <ProgressBar - android:id="@+id/progress_report" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:layout_marginTop="48dp" - android:visibility="gone" /> + </LinearLayout> </LinearLayout> </ScrollView> |
