diff options
| author | Claude <noreply@anthropic.com> | 2026-04-10 22:47:27 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-04-10 22:47:27 +0000 |
| commit | fc7192288109fc3542670cbeeaebe0de2a75eb74 (patch) | |
| tree | d78d33ad92fb32e6a57ea3df0ebf327540597d0e /android-app/app/src/main/res | |
| parent | b01a638674a313355664cc387e7da0d77a9c32d0 (diff) | |
Add Learn tab; move quit to Safety; remove persistent MOB FAB
UI cleanup:
- Remove always-visible MOB FAB — Safety screen button is sufficient
- Remove floating quit button; move to bottom of Safety screen
- fragment_container is now clickable/focusable, blocking map touch-through
for all overlays (trip reports, log, safety)
- Record Track FAB hidden while any overlay is shown, visible on map tab
New Learn tab (5th nav item):
- Migration guides for Navionics and Sea People (local markdown via DocFragment)
- ASA Course Catalog, ASA Online Learning, ColRegs, Sailing Flashcards
(open in browser)
- Remove blanket assets/ .gitignore so markdown docs are tracked
https://claude.ai/code/session_01HXPjBsogsJVRwCiekDGkJX
Diffstat (limited to 'android-app/app/src/main/res')
5 files changed, 261 insertions, 33 deletions
diff --git a/android-app/app/src/main/res/drawable/ic_learn.xml b/android-app/app/src/main/res/drawable/ic_learn.xml new file mode 100644 index 0000000..1574693 --- /dev/null +++ b/android-app/app/src/main/res/drawable/ic_learn.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M12,3L1,9l11,6 9-4.91V17h2V9L12,3zM5,13.18v4L12,21l7-3.82v-4L12,17l-7-3.82z"/> +</vector> 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 5943949..1bb88b3 100644 --- a/android-app/app/src/main/res/layout/activity_main.xml +++ b/android-app/app/src/main/res/layout/activity_main.xml @@ -59,26 +59,10 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone" + android:clickable="true" + android:focusable="true" android:background="?attr/colorSurface" /> - <!-- Quit button — stops all services and exits --> - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_quit" - style="@style/Widget.Material3.Button.IconButton.Filled.Tonal" - android:layout_width="40dp" - android:layout_height="40dp" - android:alpha="0.7" - app:icon="@drawable/ic_close" - app:iconSize="18dp" - app:iconGravity="textStart" - app:iconPadding="0dp" - app:cornerRadius="20dp" - app:elevation="4dp" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintEnd_toEndOf="parent" - android:layout_marginTop="16dp" - android:layout_marginEnd="16dp" /> - <com.google.android.material.button.MaterialButton android:id="@+id/fab_recenter" android:layout_width="wrap_content" @@ -115,21 +99,6 @@ </androidx.cardview.widget.CardView> - <!-- Persistent MOB Button (Crucial for safety, always on top) --> - <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/fab_mob" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_margin="16dp" - android:clickable="true" - android:focusable="true" - android:contentDescription="Man Overboard" - app:srcCompat="@android:drawable/ic_dialog_alert" - app:backgroundTint="@color/mob_button_background" - app:elevation="20dp" - app:layout_anchor="@id/instrument_bottom_sheet" - app:layout_anchorGravity="top|start" /> - <!-- Record Track Button --> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fab_record_track" diff --git a/android-app/app/src/main/res/layout/fragment_learn.xml b/android-app/app/src/main/res/layout/fragment_learn.xml new file mode 100644 index 0000000..f41e577 --- /dev/null +++ b/android-app/app/src/main/res/layout/fragment_learn.xml @@ -0,0 +1,235 @@ +<?xml version="1.0" encoding="utf-8"?> +<ScrollView + 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:background="?attr/colorSurface"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="24dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Learn" + android:textSize="24sp" + android:textStyle="bold" + android:textColor="?attr/colorOnSurface" + android:layout_marginBottom="24dp" /> + + <!-- ── Migration Guides ─────────────────────────────────────── --> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="MIGRATION GUIDES" + android:textSize="11sp" + android:textAllCaps="true" + android:letterSpacing="0.12" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginBottom="8dp" /> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_migrate_navionics" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + app:cardCornerRadius="12dp" + app:cardElevation="2dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:padding="16dp" + android:gravity="center_vertical"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="Migrating from Navionics" + android:textAppearance="?attr/textAppearanceTitleSmall" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="›" + android:textSize="20sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + </LinearLayout> + </com.google.android.material.card.MaterialCardView> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_migrate_seapeople" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="24dp" + app:cardCornerRadius="12dp" + app:cardElevation="2dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:padding="16dp" + android:gravity="center_vertical"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="Migrating from Sea People" + android:textAppearance="?attr/textAppearanceTitleSmall" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="›" + android:textSize="20sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + </LinearLayout> + </com.google.android.material.card.MaterialCardView> + + <!-- ── ASA Training & Practice ──────────────────────────────── --> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="ASA TRAINING & PRACTICE" + android:textSize="11sp" + android:textAllCaps="true" + android:letterSpacing="0.12" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginBottom="8dp" /> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_asa_courses" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + app:cardCornerRadius="12dp" + app:cardElevation="2dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="ASA Course Catalog" + android:textAppearance="?attr/textAppearanceTitleSmall" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="ASA 101–114: keelboat through offshore passagemaking" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginTop="2dp" /> + + </LinearLayout> + </com.google.android.material.card.MaterialCardView> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_asa_online" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + app:cardCornerRadius="12dp" + app:cardElevation="2dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="ASA Online Learning" + android:textAppearance="?attr/textAppearanceTitleSmall" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Self-paced online courses and study guides" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginTop="2dp" /> + + </LinearLayout> + </com.google.android.material.card.MaterialCardView> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_colregs" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + app:cardCornerRadius="12dp" + app:cardElevation="2dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="ColRegs — Rules of the Road" + android:textAppearance="?attr/textAppearanceTitleSmall" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="USCG international collision regulations reference" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginTop="2dp" /> + + </LinearLayout> + </com.google.android.material.card.MaterialCardView> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_flashcards" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + app:cardCornerRadius="12dp" + app:cardElevation="2dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Sailing Flashcards" + android:textAppearance="?attr/textAppearanceTitleSmall" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Quizlet decks for knots, rules, lights & signals" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" + android:layout_marginTop="2dp" /> + + </LinearLayout> + </com.google.android.material.card.MaterialCardView> + + </LinearLayout> +</ScrollView> diff --git a/android-app/app/src/main/res/layout/fragment_safety.xml b/android-app/app/src/main/res/layout/fragment_safety.xml index f90420e..60ea1aa 100644 --- a/android-app/app/src/main/res/layout/fragment_safety.xml +++ b/android-app/app/src/main/res/layout/fragment_safety.xml @@ -113,4 +113,15 @@ android:text="PLAN TRIP (PRE-TRIP REPORT)" app:layout_constraintTop_toBottomOf="@id/card_anchor" /> + <com.google.android.material.button.MaterialButton + android:id="@+id/button_quit" + style="@style/Widget.Material3.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Quit" + android:textColor="?attr/colorOnSurfaceVariant" + app:icon="@drawable/ic_close" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> + </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/android-app/app/src/main/res/menu/bottom_nav_menu.xml b/android-app/app/src/main/res/menu/bottom_nav_menu.xml index e7fc15d..3037b7e 100644 --- a/android-app/app/src/main/res/menu/bottom_nav_menu.xml +++ b/android-app/app/src/main/res/menu/bottom_nav_menu.xml @@ -16,4 +16,8 @@ android:id="@+id/nav_safety" android:icon="@drawable/ic_safety" android:title="Safety" /> + <item + android:id="@+id/nav_learn" + android:icon="@drawable/ic_learn" + android:title="Learn" /> </menu> |
