diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-06-30 18:46:08 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-06-30 18:46:08 +0000 |
| commit | 8233794366939f614a9899a11f2b7093bc32d9b8 (patch) | |
| tree | 76e966f1b6bdd6eb7ba5a48a6ba430a0524162b1 /android-app/app/src/main/kotlin | |
| parent | 32c98f8ae06f2ceb8fc020d5a63662a07c2d63fb (diff) | |
feat(fishing): FishingOverlayView card UI and ic_fish vector drawable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'android-app/app/src/main/kotlin')
| -rw-r--r-- | android-app/app/src/main/kotlin/org/terst/nav/ui/fishing/FishingOverlayView.kt | 27 |
1 files changed, 27 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 + } +} |
