diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-15 05:39:21 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-15 05:39:21 +0000 |
| commit | 418f6ae8c8ccb968c2674548139dab36e2ab1905 (patch) | |
| tree | 7371f4b31a7d75b18626b51231d3ff76ebeb92a9 /android-app/app/src/main/res/layout | |
| parent | 18c2f1c038f62fda1c1cea19c12dfdd4ce411602 (diff) | |
feat: add voice log UI with FAB, fragment container, and logbook domain models
- Add VoiceLogFragment, VoiceLogViewModel, VoiceLogState, LogEntry, InMemoryLogbookRepository
- Wire voice log FAB in MainActivity to show/hide fragment container
- Add RECORD_AUDIO permission to manifest
- Add native CMakeLists.txt and native-lib.cpp stubs
- Fix missing BufferOverflow import in LocationService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'android-app/app/src/main/res/layout')
| -rw-r--r-- | android-app/app/src/main/res/layout/activity_main.xml | 25 | ||||
| -rw-r--r-- | android-app/app/src/main/res/layout/fragment_voice_log.xml | 66 |
2 files changed, 91 insertions, 0 deletions
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 eb2ed3d..54ad0cd 100644 --- a/android-app/app/src/main/res/layout/activity_main.xml +++ b/android-app/app/src/main/res/layout/activity_main.xml @@ -514,4 +514,29 @@ </androidx.constraintlayout.widget.ConstraintLayout> + <!-- Voice Log FAB --> + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_voice_log" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:clickable="true" + android:focusable="true" + android:contentDescription="Open Voice Log" + android:src="@android:drawable/ic_btn_speak_now" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toTopOf="@+id/fab_tidal" /> + + <!-- Voice Log Fragment Container --> + <FrameLayout + android:id="@+id/voice_log_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/white" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file 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 new file mode 100644 index 0000000..e5f864c --- /dev/null +++ b/android-app/app/src/main/res/layout/fragment_voice_log.xml @@ -0,0 +1,66 @@ +<?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:gravity="center" + android:padding="24dp"> + + <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:layout_marginBottom="16dp" /> + + <TextView + android:id="@+id/tv_recognized" + 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" /> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_mic" + 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" /> + + <LinearLayout + android:id="@+id/ll_confirm_buttons" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:visibility="gone"> + + <Button + android:id="@+id/btn_save" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Save" + android:layout_marginEnd="8dp" /> + + <Button + android:id="@+id/btn_retry" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Retry" /> + </LinearLayout> + + <TextView + android:id="@+id/tv_saved_confirmation" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="" + android:textSize="14sp" + android:layout_marginTop="16dp" /> +</LinearLayout> |
