diff options
| author | Claude <noreply@anthropic.com> | 2026-04-11 18:05:59 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-04-11 18:05:59 +0000 |
| commit | ec2bc313ba88477aeefcb5c943ed387de2883ee8 (patch) | |
| tree | 87db74d6774711e3dc6ac1e9e878df59c56af1ee /android-app/app/src/main/res/layout | |
| parent | f3ef61ea24a6d8d1068d847c3104437c1a874069 (diff) | |
Add hidden dev log (long-press drag handle)
NavLogger is a 200-entry in-memory ring buffer with format:
HH:mm:ss.SSS LEVEL tag: message
Entries are written at:
- App start
- First GPS fix (lat/lon/sog/cog)
- fetchCurrentConditions: request params + full success summary
(wind, temp, waves, swell, current) or exception class+message
- fetchForecastItems: request params + item count or error
DevLogSheet (BottomSheetDialogFragment) shows the log in a
monospace ScrollView with Copy and Clear buttons. Trigger: long-press
the drag handle bar on the instrument bottom sheet.
Primary use: copy the log and paste it to Claude to diagnose
conditions API failures without needing adb.
https://claude.ai/code/session_01HXPjBsogsJVRwCiekDGkJX
Diffstat (limited to 'android-app/app/src/main/res/layout')
| -rw-r--r-- | android-app/app/src/main/res/layout/sheet_dev_log.xml | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/android-app/app/src/main/res/layout/sheet_dev_log.xml b/android-app/app/src/main/res/layout/sheet_dev_log.xml new file mode 100644 index 0000000..5464242 --- /dev/null +++ b/android-app/app/src/main/res/layout/sheet_dev_log.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:background="?attr/colorSurface"> + + <!-- Header: title + action buttons --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingStart="16dp" + android:paddingEnd="8dp" + android:paddingTop="16dp" + android:paddingBottom="8dp" + android:gravity="center_vertical"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="Dev Log" + android:textSize="16sp" + android:textStyle="bold" + android:textColor="?attr/colorOnSurface" /> + + <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="Clear" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_copy" + style="@style/Widget.Material3.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Copy" /> + + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="?attr/colorOutline" + android:alpha="0.3" /> + + <ScrollView + android:id="@+id/scroll_view" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:paddingStart="12dp" + android:paddingEnd="12dp" + android:paddingTop="10dp" + android:paddingBottom="24dp" + android:clipToPadding="false"> + + <TextView + android:id="@+id/log_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:fontFamily="monospace" + android:textSize="11sp" + android:textColor="?attr/colorOnSurface" + android:lineSpacingMultiplier="1.35" + android:textIsSelectable="true" /> + + </ScrollView> + +</LinearLayout> |
