summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-06-30 18:46:08 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-06-30 18:46:08 +0000
commit8233794366939f614a9899a11f2b7093bc32d9b8 (patch)
tree76e966f1b6bdd6eb7ba5a48a6ba430a0524162b1
parent32c98f8ae06f2ceb8fc020d5a63662a07c2d63fb (diff)
feat(fishing): FishingOverlayView card UI and ic_fish vector drawable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rw-r--r--android-app/app/src/main/kotlin/org/terst/nav/ui/fishing/FishingOverlayView.kt27
-rw-r--r--android-app/app/src/main/res/drawable/ic_fish.xml10
-rw-r--r--android-app/app/src/main/res/layout/view_fishing_overlay.xml100
3 files changed, 137 insertions, 0 deletions
diff --git a/android-app/app/src/main/kotlin/org/terst/nav/ui/fishing/FishingOverlayView.kt b/android-app/app/src/main/kotlin/org/terst/nav/ui/fishing/FishingOverlayView.kt
new file mode 100644
index 0000000..c59c957
--- /dev/null
+++ b/android-app/app/src/main/kotlin/org/terst/nav/ui/fishing/FishingOverlayView.kt
@@ -0,0 +1,27 @@
+package org.terst.nav.ui.fishing
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.FrameLayout
+import android.widget.TextView
+import org.terst.nav.R
+
+class FishingOverlayView @JvmOverloads constructor(
+ context: Context, attrs: AttributeSet? = null
+) : FrameLayout(context, attrs) {
+
+ init {
+ LayoutInflater.from(context).inflate(R.layout.view_fishing_overlay, this, true)
+ }
+
+ fun bind(target: FishingTarget) {
+ findViewById<TextView>(R.id.tv_fish_species).text = target.rig.primarySpecies.displayName
+ findViewById<TextView>(R.id.tv_fish_bearing).text = "%.0f°".format(target.bearingDeg)
+ findViewById<TextView>(R.id.tv_fish_zone).text = target.zoneDescription
+ findViewById<TextView>(R.id.tv_fish_rig).text = target.rig.rigDescription
+ findViewById<TextView>(R.id.tv_fish_speed).text = "Troll %.0f kt".format(target.rig.trollingSpeedKt)
+ findViewById<TextView>(R.id.tv_fish_distance).text = "~%.0f nm".format(target.distanceNm)
+ findViewById<TextView>(R.id.tv_fish_approach).text = target.rig.approachNote
+ }
+}
diff --git a/android-app/app/src/main/res/drawable/ic_fish.xml b/android-app/app/src/main/res/drawable/ic_fish.xml
new file mode 100644
index 0000000..c60f701
--- /dev/null
+++ b/android-app/app/src/main/res/drawable/ic_fish.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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="M20,12 C18,9 14,7 10,8 L8,5 L6,8 C4,8.5 2,10 2,12 C2,14 4,15.5 6,16 L8,19 L10,16 C14,17 18,15 20,12 Z M7,12 C6.4,12 6,11.6 6,11 C6,10.4 6.4,10 7,10 C7.6,10 8,10.4 8,11 C8,11.6 7.6,12 7,12 Z" />
+</vector>
diff --git a/android-app/app/src/main/res/layout/view_fishing_overlay.xml b/android-app/app/src/main/res/layout/view_fishing_overlay.xml
new file mode 100644
index 0000000..1084d6a
--- /dev/null
+++ b/android-app/app/src/main/res/layout/view_fishing_overlay.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.google.android.material.card.MaterialCardView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ app:cardCornerRadius="12dp"
+ app:cardElevation="4dp"
+ app:cardBackgroundColor="#CC004D40">
+
+ <LinearLayout
+ android:layout_width="220dp"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="12dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:layout_marginBottom="6dp">
+
+ <TextView
+ android:id="@+id/tv_fish_species"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="Ono &amp; Mahi"
+ android:textSize="14sp"
+ android:textStyle="bold"
+ android:textColor="#FFFFFFFF" />
+
+ <TextView
+ android:id="@+id/tv_fish_bearing"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="270°"
+ android:textSize="20sp"
+ android:textStyle="bold"
+ android:textColor="#FF80CBC4" />
+
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/tv_fish_zone"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="76°F water, 1.2 kt current"
+ android:textSize="11sp"
+ android:textColor="#99FFFFFF"
+ android:layout_marginBottom="8dp" />
+
+ <TextView
+ android:id="@+id/tv_fish_rig"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Blue/white 9&#34; jet head, 80# mono"
+ android:textSize="11sp"
+ android:textColor="#CCFFFFFF"
+ android:layout_marginBottom="4dp" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
+
+ <TextView
+ android:id="@+id/tv_fish_speed"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="Troll 8 kt"
+ android:textSize="11sp"
+ android:textColor="#CCFFFFFF" />
+
+ <TextView
+ android:id="@+id/tv_fish_distance"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="~5 nm"
+ android:textSize="11sp"
+ android:textColor="#99FFFFFF" />
+
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/tv_fish_approach"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Troll along current edge; watch for color change"
+ android:textSize="10sp"
+ android:textColor="#88FFFFFF"
+ android:layout_marginTop="6dp" />
+
+ </LinearLayout>
+
+</com.google.android.material.card.MaterialCardView>