diff options
| author | Claude <noreply@anthropic.com> | 2026-05-20 21:20:27 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-05-20 21:20:27 +0000 |
| commit | 893bb60a4135e5a73a9ccc8a6d49a1953bdf0ef2 (patch) | |
| tree | 482a355bb4b176ec2c23d72c3566d5f31573ee03 /android-app/app/src/main/res | |
| parent | b3e8370e278cd9c4f822453a0a7bae05dd0ca729 (diff) | |
| parent | 4b0a4c76d94ace1593d66f6fd485b88b3b6c4994 (diff) | |
Merge main: preserve embedded track detail map, tack detection fixes, 0.12 past track opacity
- Tack detector: STABILITY_MAX=30, START_SKIP_MS=120s cold-start filter (feature branch)
- TrackDetailSheet: embedded Fragment with MapView, back button pops stack (feature branch)
- layout_track_detail_sheet: MapView top half, detail panel bottom half (feature branch)
- MapHandler past track dim opacity: 0.12 (down from 0.22)
- SavedTracksFragment: fragment transaction to TrackDetailSheet + SAF setup (both)
- VoiceLogFragment: inline track list, logViewModel refs fixed (main)
Diffstat (limited to 'android-app/app/src/main/res')
4 files changed, 228 insertions, 161 deletions
diff --git a/android-app/app/src/main/res/layout/fragment_saved_tracks.xml b/android-app/app/src/main/res/layout/fragment_saved_tracks.xml index 7485e59..a95b368 100644 --- a/android-app/app/src/main/res/layout/fragment_saved_tracks.xml +++ b/android-app/app/src/main/res/layout/fragment_saved_tracks.xml @@ -34,15 +34,32 @@ </LinearLayout> - <TextView - android:id="@+id/tv_empty" + <LinearLayout + android:id="@+id/layout_empty" android:layout_width="match_parent" android:layout_height="match_parent" + android:orientation="vertical" android:gravity="center" - android:text="No saved tracks yet.\nRecord a trip to see it here." - android:textAlignment="center" - android:textColor="?attr/colorOnSurfaceVariant" - android:visibility="gone" /> + android:padding="32dp" + android:visibility="gone"> + + <TextView + android:id="@+id/tv_empty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="No saved tracks yet.\nRecord a trip to see it here." + android:textAlignment="center" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_setup_storage" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="24dp" + android:text="Set up track storage" + android:visibility="gone" /> + + </LinearLayout> <androidx.recyclerview.widget.RecyclerView android:id="@+id/rv_saved_tracks" diff --git a/android-app/app/src/main/res/layout/fragment_voice_log.xml b/android-app/app/src/main/res/layout/fragment_voice_log.xml index c1275a6..389add1 100644 --- a/android-app/app/src/main/res/layout/fragment_voice_log.xml +++ b/android-app/app/src/main/res/layout/fragment_voice_log.xml @@ -1,156 +1,221 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.core.widget.NestedScrollView + xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" - android:padding="20dp"> + android:layout_height="match_parent"> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Log Entry" - android:textAppearance="?attr/textAppearanceHeadlineSmall" - android:layout_marginBottom="16dp" /> - - <!-- Note text — voice fills this; user can also type directly --> - <com.google.android.material.textfield.TextInputLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="12dp" - style="@style/Widget.Material3.TextInputLayout.OutlinedBox"> - - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/et_note" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minLines="3" - android:maxLines="6" - android:gravity="top" - android:hint="Tap mic or type a note…" - android:inputType="textMultiLine|textCapSentences" - android:scrollbars="vertical" /> - - </com.google.android.material.textfield.TextInputLayout> - - <!-- Action row: mic, camera, gallery, status --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical" - android:layout_marginBottom="12dp"> - - <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/fab_mic" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - app:fabSize="mini" - android:src="@android:drawable/ic_btn_speak_now" - android:contentDescription="Start voice recognition" - android:layout_marginEnd="12dp" /> + android:orientation="vertical" + android:padding="20dp"> - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_camera" - style="@style/Widget.Material3.Button.IconButton.Outlined" - android:layout_width="wrap_content" + <!-- ── Log entry section — visible only while recording ── --> + <LinearLayout + android:id="@+id/layout_log_entry" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:contentDescription="Take photo" - app:icon="@android:drawable/ic_menu_camera" - android:layout_marginEnd="8dp" /> - + android:orientation="vertical" + android:visibility="gone"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Log Entry" + android:textAppearance="?attr/textAppearanceHeadlineSmall" + android:layout_marginBottom="16dp" /> + + <com.google.android.material.textfield.TextInputLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="12dp" + style="@style/Widget.Material3.TextInputLayout.OutlinedBox"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/et_note" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minLines="3" + android:maxLines="6" + android:gravity="top" + android:hint="Tap mic or type a note…" + android:inputType="textMultiLine|textCapSentences" + android:scrollbars="vertical" /> + + </com.google.android.material.textfield.TextInputLayout> + + <!-- Action row: mic, camera, gallery, status --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="12dp"> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_mic" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:fabSize="mini" + android:src="@android:drawable/ic_btn_speak_now" + android:contentDescription="Start voice recognition" + android:layout_marginEnd="12dp" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_camera" + style="@style/Widget.Material3.Button.IconButton.Outlined" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="Take photo" + app:icon="@android:drawable/ic_menu_camera" + android:layout_marginEnd="8dp" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_gallery" + style="@style/Widget.Material3.Button.IconButton.Outlined" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="Attach photo from gallery" + app:icon="@android:drawable/ic_menu_gallery" + android:layout_marginEnd="12dp" /> + + <TextView + android:id="@+id/tv_status" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="" + android:textSize="14sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + </LinearLayout> + + <!-- Photo thumbnail — hidden until a photo is attached --> + <FrameLayout + android:id="@+id/frame_photo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="12dp" + android:visibility="gone"> + + <ImageView + android:id="@+id/iv_photo" + android:layout_width="120dp" + android:layout_height="90dp" + android:scaleType="centerCrop" + android:contentDescription="Attached photo" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_remove_photo" + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_gravity="top|end" + android:contentDescription="Remove photo" + app:icon="@drawable/ic_close" /> + + </FrameLayout> + + <!-- Save / Clear row --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="12dp"> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_save" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="Save" + android:layout_marginEnd="8dp" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_clear" + style="@style/Widget.Material3.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Clear" /> + + </LinearLayout> + + <TextView + android:id="@+id/tv_saved_confirmation" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="" + android:textSize="14sp" + android:textColor="?attr/colorPrimary" + android:layout_marginBottom="20dp" /> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="?attr/colorOutline" + android:layout_marginBottom="20dp" /> + + </LinearLayout> + <!-- end layout_log_entry --> + + <!-- Generate Trip Report — always accessible --> <com.google.android.material.button.MaterialButton - android:id="@+id/btn_gallery" - style="@style/Widget.Material3.Button.IconButton.Outlined" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:contentDescription="Attach photo from gallery" - app:icon="@android:drawable/ic_menu_gallery" - android:layout_marginEnd="12dp" /> + android:id="@+id/btn_generate_report" + style="@style/Widget.Material3.Button.TonalButton" + android:layout_width="match_parent" + android:layout_height="60dp" + android:text="GENERATE TRIP REPORT" + android:layout_marginBottom="24dp" /> + <!-- ── Trips section ── --> <TextView - android:id="@+id/tv_status" - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:text="" - android:textSize="14sp" - android:textColor="?attr/colorOnSurfaceVariant" /> - - </LinearLayout> - - <!-- Photo thumbnail — hidden until a photo is attached --> - <FrameLayout - android:id="@+id/frame_photo" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginBottom="12dp" - android:visibility="gone"> - - <ImageView - android:id="@+id/iv_photo" - android:layout_width="120dp" - android:layout_height="90dp" - android:scaleType="centerCrop" - android:contentDescription="Attached photo" /> - - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_remove_photo" - style="@style/Widget.Material3.Button.IconButton" - android:layout_width="32dp" - android:layout_height="32dp" - android:layout_gravity="top|end" - android:contentDescription="Remove photo" - app:icon="@drawable/ic_close" /> - - </FrameLayout> - - <!-- Save / Clear row --> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical" - android:layout_marginBottom="12dp"> - - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_save" - android:layout_width="0dp" + android:text="Trips" + android:textSize="13sp" + android:textAllCaps="true" + android:letterSpacing="0.08" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginBottom="8dp" /> + + <!-- Empty state --> + <LinearLayout + android:id="@+id/layout_empty" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:text="Save" - android:layout_marginEnd="8dp" /> - - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_clear" - style="@style/Widget.Material3.Button.TextButton" - android:layout_width="wrap_content" + android:orientation="vertical" + android:gravity="center_horizontal" + android:paddingVertical="24dp" + android:visibility="gone"> + + <TextView + android:id="@+id/tv_empty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="No saved tracks yet.\nRecord a trip to see it here." + android:textAlignment="center" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_setup_storage" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:text="Set up track storage" + android:visibility="gone" /> + + </LinearLayout> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/rv_saved_tracks" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="Clear" /> + android:nestedScrollingEnabled="false" + android:clipToPadding="false" + android:paddingBottom="80dp" /> </LinearLayout> - <!-- Saved confirmation --> - <TextView - android:id="@+id/tv_saved_confirmation" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="" - android:textSize="14sp" - android:textColor="?attr/colorPrimary" - android:layout_marginBottom="24dp" /> - - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="?attr/colorOutline" - android:layout_marginBottom="24dp" /> - - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_generate_report" - style="@style/Widget.Material3.Button.TonalButton" - android:layout_width="match_parent" - android:layout_height="60dp" - android:text="GENERATE TRIP REPORT" /> - -</LinearLayout> +</androidx.core.widget.NestedScrollView> diff --git a/android-app/app/src/main/res/layout/layout_instruments_sheet.xml b/android-app/app/src/main/res/layout/layout_instruments_sheet.xml index f8dc365..5e58009 100644 --- a/android-app/app/src/main/res/layout/layout_instruments_sheet.xml +++ b/android-app/app/src/main/res/layout/layout_instruments_sheet.xml @@ -183,8 +183,7 @@ android:layout_marginEnd="-16dp" app:layout_constraintTop_toBottomOf="@id/wave_divider" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintBottom_toBottomOf="parent"> + app:layout_constraintEnd_toEndOf="parent"> <!-- Current --> <LinearLayout @@ -339,19 +338,5 @@ </LinearLayout> - <!-- Saved Tracks button --> - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_saved_tracks" - style="@style/Widget.Material3.Button.OutlinedButton" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginHorizontal="16dp" - android:layout_marginTop="12dp" - android:layout_marginBottom="8dp" - android:text="Saved Tracks" - android:textAllCaps="false" - app:layout_constraintTop_toBottomOf="@id/forecast_row" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/android-app/app/src/main/res/values/colors.xml b/android-app/app/src/main/res/values/colors.xml index 2df4109..c3b115c 100755 --- a/android-app/app/src/main/res/values/colors.xml +++ b/android-app/app/src/main/res/values/colors.xml @@ -52,7 +52,7 @@ <color name="wave_sky_top">#2B8FC4</color> <color name="wave_sky_bottom">#87C8DF</color> <color name="wave_sea_top">#0D7A9A</color> - <color name="wave_sea_bottom">#074B68</color> + <color name="wave_sea_bottom">#0D2137</color> <color name="wave_shimmer">#50FFFFFF</color> <color name="wave_whitecap">#80FFFFFF</color> |
