diff options
Diffstat (limited to 'android-app/app/src/main/res/layout')
8 files changed, 504 insertions, 292 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_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_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/fragment_voice_log.xml b/android-app/app/src/main/res/layout/fragment_voice_log.xml index c1275a6..4a2ff14 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,249 @@ <?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 + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="12dp" - style="@style/Widget.Material3.TextInputLayout.OutlinedBox"> + android:orientation="vertical" + android:padding="20dp"> - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/et_note" + <!-- ── 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: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"> + 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 --> + + <!-- ── Log entries section ── --> + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Log Entries" + android:textSize="13sp" + android:textAllCaps="true" + android:letterSpacing="0.08" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginBottom="8dp" /> - <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/fab_mic" - android:layout_width="wrap_content" + <TextView + android:id="@+id/tv_no_log_entries" + android:layout_width="match_parent" 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:text="No log entries yet." + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginBottom="8dp" + android:visibility="visible" /> - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_camera" - style="@style/Widget.Material3.Button.IconButton.Outlined" - android:layout_width="wrap_content" + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/rv_log_entries" + 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:nestedScrollingEnabled="false" + android:clipToPadding="false" + android:layout_marginBottom="16dp" /> + <!-- 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/item_log_entry.xml b/android-app/app/src/main/res/layout/item_log_entry.xml index fc53ef1..e23c7c2 100644 --- a/android-app/app/src/main/res/layout/item_log_entry.xml +++ b/android-app/app/src/main/res/layout/item_log_entry.xml @@ -49,6 +49,18 @@ app:layout_constraintTop_toBottomOf="@id/tv_log_label" app:layout_constraintStart_toEndOf="@id/tv_log_icon" app:layout_constraintEnd_toEndOf="parent" + android:layout_marginStart="8dp" /> + + <ImageView + android:id="@+id/iv_log_thumb" + android:layout_width="80dp" + android:layout_height="60dp" + android:scaleType="centerCrop" + android:layout_marginTop="6dp" + android:contentDescription="Log photo" + android:visibility="gone" + app:layout_constraintTop_toBottomOf="@id/tv_log_detail" + app:layout_constraintStart_toEndOf="@id/tv_log_icon" app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="8dp" /> diff --git a/android-app/app/src/main/res/layout/item_logbook_entry.xml b/android-app/app/src/main/res/layout/item_logbook_entry.xml new file mode 100644 index 0000000..10cec4a --- /dev/null +++ b/android-app/app/src/main/res/layout/item_logbook_entry.xml @@ -0,0 +1,50 @@ +<?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="horizontal" + android:padding="12dp" + android:gravity="center_vertical" + android:background="?attr/selectableItemBackground"> + + <ImageView + android:id="@+id/iv_logbook_photo" + android:layout_width="64dp" + android:layout_height="48dp" + android:scaleType="centerCrop" + android:layout_marginEnd="12dp" + android:contentDescription="Log photo" + android:visibility="gone" /> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:id="@+id/tv_logbook_timestamp" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <TextView + android:id="@+id/tv_logbook_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="14sp" + android:layout_marginTop="2dp" /> + + <TextView + android:id="@+id/tv_logbook_location" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginTop="2dp" + android:visibility="gone" /> + + </LinearLayout> + +</LinearLayout> 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/layout/layout_track_detail_sheet.xml b/android-app/app/src/main/res/layout/layout_track_detail_sheet.xml index 6a2ba50..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 @@ -6,100 +6,136 @@ android:orientation="vertical" android:background="?attr/colorSurface"> - <!-- Header --> + <!-- Track map — top half --> + <org.maplibre.android.maps.MapView + android:id="@+id/track_map_view" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> + + <!-- Detail panel — bottom half --> <LinearLayout android:layout_width="match_parent" - android:layout_height="56dp" - android:orientation="horizontal" - android:gravity="center_vertical" - android:paddingStart="8dp" - android:paddingEnd="16dp" - android:elevation="4dp" + android:layout_height="0dp" + android:layout_weight="1" + android:orientation="vertical" android:background="?attr/colorSurface"> - <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" /> + <!-- Header --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="56dp" + android:orientation="horizontal" + android:gravity="center_vertical" + android:paddingStart="8dp" + android:paddingEnd="16dp" + android:elevation="4dp" + android:background="?attr/colorSurface"> - </LinearLayout> + <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" /> - <!-- 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" - android:layout_weight="1" android:orientation="vertical" android:gravity="center"> - <TextView android:id="@+id/detail_distance" android:layout_width="wrap_content" - android:layout_height="wrap_content" android:textSize="22sp" android:textStyle="bold" /> - <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="nm" android:textSize="11sp" android:textColor="?attr/colorOnSurfaceVariant" /> - </LinearLayout> + <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 android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_weight="1" android:orientation="vertical" android:gravity="center"> - <TextView android:id="@+id/detail_duration" android:layout_width="wrap_content" - android:layout_height="wrap_content" android:textSize="22sp" android:textStyle="bold" /> - <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="time" android:textSize="11sp" android:textColor="?attr/colorOnSurfaceVariant" /> </LinearLayout> - <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_weight="1" android:orientation="vertical" android:gravity="center"> - <TextView android:id="@+id/detail_max_sog" android:layout_width="wrap_content" - android:layout_height="wrap_content" android:textSize="22sp" android:textStyle="bold" /> - <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="max kt" android:textSize="11sp" android:textColor="?attr/colorOnSurfaceVariant" /> - </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="8dp" + android:paddingBottom="8dp"> + + <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_weight="1" android:orientation="vertical" android:gravity="center"> + <TextView android:id="@+id/detail_distance" android:layout_width="wrap_content" + android:layout_height="wrap_content" android:textSize="22sp" android:textStyle="bold" /> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="nm" android:textSize="11sp" android:textColor="?attr/colorOnSurfaceVariant" /> + </LinearLayout> + + <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_weight="1" android:orientation="vertical" android:gravity="center"> + <TextView android:id="@+id/detail_duration" android:layout_width="wrap_content" + android:layout_height="wrap_content" android:textSize="22sp" android:textStyle="bold" /> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="time" android:textSize="11sp" android:textColor="?attr/colorOnSurfaceVariant" /> + </LinearLayout> + + <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_weight="1" android:orientation="vertical" android:gravity="center"> + <TextView android:id="@+id/detail_max_sog" android:layout_width="wrap_content" + android:layout_height="wrap_content" android:textSize="22sp" android:textStyle="bold" /> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="max kt" android:textSize="11sp" android:textColor="?attr/colorOnSurfaceVariant" /> + </LinearLayout> + + <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_weight="1" android:orientation="vertical" android:gravity="center"> + <TextView android:id="@+id/detail_avg_sog" android:layout_width="wrap_content" + android:layout_height="wrap_content" android:textSize="22sp" android:textStyle="bold" /> + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="avg kt" android:textSize="11sp" android:textColor="?attr/colorOnSurfaceVariant" /> + </LinearLayout> - <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_weight="1" android:orientation="vertical" android:gravity="center"> - <TextView android:id="@+id/detail_avg_sog" android:layout_width="wrap_content" - android:layout_height="wrap_content" android:textSize="22sp" android:textStyle="bold" /> - <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="avg kt" android:textSize="11sp" android:textColor="?attr/colorOnSurfaceVariant" /> </LinearLayout> - </LinearLayout> + <View android:layout_width="match_parent" android:layout_height="1dp" + android:background="?attr/colorOutlineVariant" android:layout_marginHorizontal="16dp" /> - <View android:layout_width="match_parent" android:layout_height="1dp" - android:background="?attr/colorOutlineVariant" android:layout_marginHorizontal="16dp" /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:paddingStart="20dp" + android:paddingEnd="8dp" + android:paddingTop="8dp" + android:paddingBottom="4dp"> - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingHorizontal="20dp" - android:paddingTop="12dp" - android:paddingBottom="4dp" - android:text="Event Log" - android:textSize="13sp" - android:textAllCaps="true" - android:letterSpacing="0.08" - android:textColor="?attr/colorOnSurfaceVariant" /> - - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/rv_log_entries" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:clipToPadding="false" - android:paddingBottom="24dp" /> + <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" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:clipToPadding="false" + android:paddingBottom="24dp" /> + + </LinearLayout> </LinearLayout> |
