diff options
Diffstat (limited to 'android-app/app/src/main/res/layout')
3 files changed, 125 insertions, 70 deletions
diff --git a/android-app/app/src/main/res/layout/activity_main.xml b/android-app/app/src/main/res/layout/activity_main.xml index 99aa192..c6e80e0 100644 --- a/android-app/app/src/main/res/layout/activity_main.xml +++ b/android-app/app/src/main/res/layout/activity_main.xml @@ -87,7 +87,7 @@ android:visibility="gone" android:clickable="true" android:focusable="true" - android:background="?attr/colorSurface" /> + android:background="?attr/colorSurfaceContainerHigh" /> <!-- Fishing mode overlay card — bottom-start, above bottom sheet --> <org.terst.nav.ui.fishing.FishingOverlayView @@ -126,7 +126,8 @@ android:layout_height="wrap_content" app:behavior_hideable="false" app:behavior_peekHeight="120dp" - app:cardElevation="4dp" + app:cardElevation="0dp" + app:cardBackgroundColor="?attr/colorSurfaceContainerHigh" app:strokeWidth="0dp" app:shapeAppearance="@style/ShapeAppearance.Nav.BottomSheet" app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> @@ -191,7 +192,7 @@ android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/colorSurface" + android:background="?attr/colorSurfaceContainerHigh" app:menu="@menu/bottom_nav_menu" /> </LinearLayout> diff --git a/android-app/app/src/main/res/layout/dialog_new_note.xml b/android-app/app/src/main/res/layout/dialog_new_note.xml new file mode 100644 index 0000000..a403b8d --- /dev/null +++ b/android-app/app/src/main/res/layout/dialog_new_note.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + 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="wrap_content" + android:orientation="vertical" + android:padding="20dp"> + + <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_dialog_note" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minLines="4" + android:maxLines="8" + android:gravity="top" + android:hint="Add a note…" + android:inputType="textMultiLine|textCapSentences" /> + + </com.google.android.material.textfield.TextInputLayout> + + <!-- Camera / gallery row --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="8dp"> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_dialog_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_dialog_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" /> + + </LinearLayout> + + <!-- Photo preview --> + <FrameLayout + android:id="@+id/frame_dialog_photo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone"> + + <ImageView + android:id="@+id/iv_dialog_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_dialog_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> + +</LinearLayout> 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 cacc6d6..5726154 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 @@ -13,19 +13,48 @@ android:orientation="vertical" android:padding="20dp"> - <!-- ── Log entry section ── --> + <!-- ── Header row: title + new note button (shown when not recording) ── --> <LinearLayout - android:id="@+id/layout_log_entry" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical"> + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="8dp"> <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="Ship's Log" + android:textAppearance="?attr/textAppearanceHeadlineSmall" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_new_note" + style="@style/Widget.Material3.Button.TonalButton.Icon" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Log Entry" - android:textAppearance="?attr/textAppearanceHeadlineSmall" - android:layout_marginBottom="16dp" /> + android:text="New Note" + app:icon="@android:drawable/ic_input_add" + android:visibility="gone" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_plan_trip" + style="@style/Widget.Material3.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Plan Trip" + android:textSize="12sp" + android:layout_marginStart="4dp" /> + + </LinearLayout> + + <!-- ── Inline log entry (shown only while recording) ── --> + <LinearLayout + android:id="@+id/layout_log_entry" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:visibility="gone"> <com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" @@ -156,68 +185,12 @@ android:layout_width="match_parent" android:layout_height="1dp" android:background="?attr/colorOutline" - android:layout_marginBottom="20dp" /> + android:layout_marginBottom="16dp" /> </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" /> - - <TextView - android:id="@+id/tv_no_log_entries" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="No log entries yet." - android:textColor="?attr/colorOnSurfaceVariant" - android:layout_marginBottom="8dp" - android:visibility="visible" /> - - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/rv_log_entries" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:nestedScrollingEnabled="false" - android:clipToPadding="false" - android:layout_marginBottom="16dp" /> - - <!-- ── Trips section ── --> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical" - android:layout_marginBottom="8dp"> - - <TextView - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:text="Trips" - android:textSize="13sp" - android:textAllCaps="true" - android:letterSpacing="0.08" - android:textColor="?attr/colorOnSurfaceVariant" /> - - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_plan_trip" - style="@style/Widget.Material3.Button.TextButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Plan Trip" - android:textSize="12sp" /> - - </LinearLayout> - - <!-- Empty state --> + <!-- ── SAF / empty state ── --> <LinearLayout android:id="@+id/layout_empty" android:layout_width="match_parent" @@ -231,7 +204,7 @@ 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:text="No entries yet.\nRecord a trip or add a note to get started." android:textAlignment="center" android:textColor="?attr/colorOnSurfaceVariant" /> @@ -245,13 +218,14 @@ </LinearLayout> + <!-- ── Unified ship's log list ── --> <androidx.recyclerview.widget.RecyclerView - android:id="@+id/rv_saved_tracks" + android:id="@+id/rv_ship_log" android:layout_width="match_parent" android:layout_height="wrap_content" android:nestedScrollingEnabled="false" android:clipToPadding="false" - android:paddingBottom="80dp" /> + android:paddingBottom="16dp" /> </LinearLayout> |
