summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/res/layout
diff options
context:
space:
mode:
Diffstat (limited to 'android-app/app/src/main/res/layout')
-rw-r--r--android-app/app/src/main/res/layout/fragment_learn.xml226
-rw-r--r--android-app/app/src/main/res/layout/fragment_pretrip_report.xml52
-rw-r--r--android-app/app/src/main/res/layout/fragment_voice_log.xml142
3 files changed, 335 insertions, 85 deletions
diff --git a/android-app/app/src/main/res/layout/fragment_learn.xml b/android-app/app/src/main/res/layout/fragment_learn.xml
index f41e577..8813ba2 100644
--- a/android-app/app/src/main/res/layout/fragment_learn.xml
+++ b/android-app/app/src/main/res/layout/fragment_learn.xml
@@ -96,11 +96,11 @@
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
- <!-- ── ASA Training & Practice ──────────────────────────────── -->
+ <!-- ── Reference (offline) ──────────────────────────────────── -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="ASA TRAINING &amp; PRACTICE"
+ android:text="REFERENCE"
android:textSize="11sp"
android:textAllCaps="true"
android:letterSpacing="0.12"
@@ -108,7 +108,7 @@
android:layout_marginBottom="8dp" />
<com.google.android.material.card.MaterialCardView
- android:id="@+id/card_asa_courses"
+ android:id="@+id/card_colregs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
@@ -118,59 +118,102 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="16dp">
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:gravity="center_vertical">
- <TextView
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:text="ASA Course Catalog"
- android:textAppearance="?attr/textAppearanceTitleSmall" />
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <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="International collision regulations, rules 1–38"
+ android:textSize="12sp"
+ android:textColor="?attr/colorOnSurfaceVariant"
+ android:layout_marginTop="2dp" />
+
+ </LinearLayout>
<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" />
+ 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_asa_online"
+ android:id="@+id/card_sailing_reference"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
+ android:layout_marginBottom="24dp"
app:cardCornerRadius="12dp"
app:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="16dp">
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:gravity="center_vertical">
- <TextView
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:text="ASA Online Learning"
- android:textAppearance="?attr/textAppearanceTitleSmall" />
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Sailing Quick Reference"
+ android:textAppearance="?attr/textAppearanceTitleSmall" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Points of sail, lights &amp; shapes, knots"
+ android:textSize="12sp"
+ android:textColor="?attr/colorOnSurfaceVariant"
+ android:layout_marginTop="2dp" />
+
+ </LinearLayout>
<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" />
+ android:text="›"
+ android:textSize="20sp"
+ android:textColor="?attr/colorOnSurfaceVariant" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
+ <!-- ── ASA Training &amp; Practice (external links) ──────────── -->
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="ASA TRAINING &amp; 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_colregs"
+ android:id="@+id/card_asa_courses"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
@@ -180,22 +223,85 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="16dp">
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:gravity="center_vertical">
- <TextView
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:text="ColRegs — Rules of the Road"
- android:textAppearance="?attr/textAppearanceTitleSmall" />
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <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>
+
+ <ImageView
+ android:layout_width="18dp"
+ android:layout_height="18dp"
+ android:src="@drawable/ic_open_in_new"
+ android:tint="?attr/colorOnSurfaceVariant"
+ android:contentDescription="Opens in browser" />
- <TextView
- android:layout_width="wrap_content"
+ </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="horizontal"
+ android:padding="16dp"
+ android:gravity="center_vertical">
+
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:text="USCG international collision regulations reference"
- android:textSize="12sp"
- android:textColor="?attr/colorOnSurfaceVariant"
- android:layout_marginTop="2dp" />
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <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>
+
+ <ImageView
+ android:layout_width="18dp"
+ android:layout_height="18dp"
+ android:src="@drawable/ic_open_in_new"
+ android:tint="?attr/colorOnSurfaceVariant"
+ android:contentDescription="Opens in browser" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
@@ -211,22 +317,38 @@
<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" />
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:gravity="center_vertical">
- <TextView
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:text="Quizlet decks for knots, rules, lights &amp; signals"
- android:textSize="12sp"
- android:textColor="?attr/colorOnSurfaceVariant"
- android:layout_marginTop="2dp" />
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <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 &amp; signals"
+ android:textSize="12sp"
+ android:textColor="?attr/colorOnSurfaceVariant"
+ android:layout_marginTop="2dp" />
+
+ </LinearLayout>
+
+ <ImageView
+ android:layout_width="18dp"
+ android:layout_height="18dp"
+ android:src="@drawable/ic_open_in_new"
+ android:tint="?attr/colorOnSurfaceVariant"
+ android:contentDescription="Opens in browser" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
diff --git a/android-app/app/src/main/res/layout/fragment_pretrip_report.xml b/android-app/app/src/main/res/layout/fragment_pretrip_report.xml
index 510411b..8cb094a 100644
--- a/android-app/app/src/main/res/layout/fragment_pretrip_report.xml
+++ b/android-app/app/src/main/res/layout/fragment_pretrip_report.xml
@@ -54,6 +54,58 @@
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
+ <!-- ── Departure time picker ──────────────────────────────── -->
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/card_departure"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="12dp"
+ app:cardElevation="2dp"
+ app:cardCornerRadius="12dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:gravity="center_vertical">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="DEPART"
+ android:textSize="11sp"
+ android:textAllCaps="true"
+ android:letterSpacing="0.12"
+ android:textColor="?attr/colorOnSurfaceVariant"
+ android:layout_marginBottom="4dp" />
+
+ <TextView
+ android:id="@+id/tv_departure_time"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Now"
+ android:textAppearance="?attr/textAppearanceTitleMedium" />
+
+ </LinearLayout>
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/btn_pick_departure"
+ style="@style/Widget.Material3.Button.IconButton.Outlined"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:contentDescription="Pick departure date and time"
+ app:icon="@drawable/ic_calendar" />
+
+ </LinearLayout>
+ </com.google.android.material.card.MaterialCardView>
+
<!-- ── Generate button + progress ─────────────────────────── -->
<LinearLayout
android:layout_width="match_parent"
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 6d136be..c1275a6 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,75 +1,150 @@
<?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="match_parent"
android:orientation="vertical"
- android:gravity="center"
- android:padding="24dp">
+ android:padding="20dp">
<TextView
- android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Tap microphone to log"
- android:textSize="18sp"
- android:textAlignment="center"
+ android:text="Log Entry"
+ android:textAppearance="?attr/textAppearanceHeadlineSmall"
android:layout_marginBottom="16dp" />
- <TextView
- android:id="@+id/tv_recognized"
+ <!-- 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:text=""
- android:textSize="16sp"
- android:textAlignment="center"
- android:padding="12dp"
- android:minHeight="80dp"
- android:background="#F5F5F5"
- android:layout_marginBottom="24dp" />
+ 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>
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/fab_mic"
+ <!-- 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:contentDescription="Start voice recognition"
- android:src="@android:drawable/ic_btn_speak_now"
- android:layout_marginBottom="16dp" />
+ 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:id="@+id/ll_confirm_buttons"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:visibility="gone">
+ android:gravity="center_vertical"
+ android:layout_marginBottom="12dp">
- <Button
+ <com.google.android.material.button.MaterialButton
android:id="@+id/btn_save"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
+ android:layout_weight="1"
android:text="Save"
android:layout_marginEnd="8dp" />
- <Button
- android:id="@+id/btn_retry"
+ <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="Retry" />
+ android:text="Clear" />
+
</LinearLayout>
+ <!-- Saved confirmation -->
<TextView
android:id="@+id/tv_saved_confirmation"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="14sp"
- android:layout_marginTop="16dp" />
+ android:textColor="?attr/colorPrimary"
+ android:layout_marginBottom="24dp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
- android:background="#DDDDDD"
- android:layout_marginTop="32dp"
- android:layout_marginBottom="32dp" />
+ android:background="?attr/colorOutline"
+ android:layout_marginBottom="24dp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_generate_report"
@@ -77,4 +152,5 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:text="GENERATE TRIP REPORT" />
+
</LinearLayout>