diff options
| author | Tom Cooks <tommasogagliardi+github@gmail.com> | 2026-09-30 08:49:02 -0400 |
|---|---|---|
| committer | Tom Cooks <tommasogagliardi+github@gmail.com> | 2026-09-30 08:49:02 -0400 |
| commit | 6db1714d0354d1e1105e330ce84c46a54487c3bb (patch) | |
| tree | e4011a2b512770f271381b712bbe118de71dd8ef /app/src/main/res/layout/activity_main.xml | |
| parent | e15b89af9889d94eca15380048fc2bf6bbc8e22e (diff) | |
| download | reccoon-6db1714d0354d1e1105e330ce84c46a54487c3bb.tar.gz | |
Main-screen recordings list, player actions, background recording, exports (1.4.0-alpha)
- Main screen: recordings list at the bottom (newest first); removed the separate
library screen and the top-right link
- Player: delete/rename/share/export, no autoplay, embedded-marker fallback
- Word-level tap-to-seek from Whisper token timestamps (length fallback)
- Export transcripts as .txt + .srt to Downloads
- RecordingService: microphone foreground service for background recording
- FileProvider for sharing on Android 9 and older
- StreamingResampler extracted to its own class + JUnit regression tests
- Bump to 1.4.0-alpha (versionCode 6)
Diffstat (limited to 'app/src/main/res/layout/activity_main.xml')
| -rw-r--r-- | app/src/main/res/layout/activity_main.xml | 328 |
1 files changed, 166 insertions, 162 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 8bda7d3..e919117 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,178 +1,182 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/background" - android:paddingLeft="20dp" - android:paddingRight="20dp"> - - <TextView - android:id="@+id/titleText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="16dp" - android:letterSpacing="0.04" - android:text="@string/app_name" - android:textColor="@color/text_primary" - android:textSize="30sp" - android:textStyle="bold" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> - - <TextView - android:id="@+id/libraryButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:layout_marginEnd="4dp" - android:background="?android:attr/selectableItemBackground" - android:padding="8dp" - android:text="@string/library" - android:textColor="@color/text_secondary" - android:textSize="14sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent" /> - - <TextView - android:id="@+id/subtitleText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/subtitle" - android:textColor="@color/text_secondary" - android:textSize="12sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/titleText" /> - - <ImageView - android:id="@+id/recIndicator" - android:layout_width="12dp" - android:layout_height="12dp" - android:layout_marginBottom="6dp" - android:contentDescription="@null" - android:src="@drawable/ic_rec_dot" - android:visibility="invisible" - app:layout_constraintBottom_toTopOf="@id/timerText" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView - android:id="@+id/timerText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginBottom="10dp" - android:fontFamily="monospace" - android:text="@string/timer_zero" - android:textColor="@color/text_primary" - android:textSize="46sp" - android:textStyle="bold" - app:layout_constraintBottom_toTopOf="@id/recordButton" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <ImageButton - android:id="@+id/recordButton" - android:layout_width="148dp" - android:layout_height="148dp" - android:background="@drawable/bg_record_idle" - android:contentDescription="@string/cd_record" - android:scaleType="centerInside" - android:src="@android:color/transparent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_bias="0.34" /> - - <com.wuhei.reccoon.WaveformView - android:id="@+id/waveformView" - android:layout_width="0dp" - android:layout_height="64dp" - android:layout_marginTop="16dp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/recordButton" /> - - <com.wuhei.reccoon.LevelMeterView - android:id="@+id/levelMeter" - android:layout_width="0dp" - android:layout_height="38dp" - android:layout_marginTop="10dp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/waveformView" /> - - <Button - android:id="@+id/markButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="6dp" - android:enabled="false" - android:minWidth="140dp" - android:text="@string/mark_action" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/levelMeter" /> + android:fillViewport="true"> <LinearLayout - android:id="@+id/optionsRow" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="2dp" - android:gravity="center" - android:orientation="horizontal" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/markButton"> - - <androidx.appcompat.widget.AppCompatCheckBox - android:id="@+id/monoCheckbox" + android:orientation="vertical" + android:paddingLeft="20dp" + android:paddingTop="16dp" + android:paddingRight="20dp" + android:paddingBottom="24dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:letterSpacing="0.04" + android:text="@string/app_name" + android:textColor="@color/text_primary" + android:textSize="30sp" + android:textStyle="bold" /> + + <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:contentDescription="@string/mono_recording" - android:text="@string/mono_short" + android:layout_gravity="center_horizontal" + android:text="@string/subtitle" android:textColor="@color/text_secondary" - android:textSize="13sp" /> + android:textSize="12sp" /> + + <ImageView + android:id="@+id/recIndicator" + android:layout_width="12dp" + android:layout_height="12dp" + android:layout_gravity="center_horizontal" + android:layout_marginTop="14dp" + android:contentDescription="@null" + android:src="@drawable/ic_rec_dot" + android:visibility="invisible" /> - <androidx.appcompat.widget.AppCompatCheckBox - android:id="@+id/silenceCheckbox" + <TextView + android:id="@+id/timerText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="10dp" - android:contentDescription="@string/silence_recording" - android:text="@string/silence_short" + android:layout_gravity="center_horizontal" + android:fontFamily="monospace" + android:text="@string/timer_zero" + android:textColor="@color/text_primary" + android:textSize="46sp" + android:textStyle="bold" /> + + <ImageButton + android:id="@+id/recordButton" + android:layout_width="148dp" + android:layout_height="148dp" + android:layout_gravity="center_horizontal" + android:layout_marginTop="6dp" + android:background="@drawable/bg_record_idle" + android:contentDescription="@string/cd_record" + android:scaleType="centerInside" + android:src="@android:color/transparent" /> + + <com.wuhei.reccoon.WaveformView + android:id="@+id/waveformView" + android:layout_width="match_parent" + android:layout_height="64dp" + android:layout_marginTop="16dp" /> + + <com.wuhei.reccoon.LevelMeterView + android:id="@+id/levelMeter" + android:layout_width="match_parent" + android:layout_height="38dp" + android:layout_marginTop="10dp" /> + + <Button + android:id="@+id/markButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="6dp" + android:enabled="false" + android:minWidth="140dp" + android:text="@string/mark_action" /> + + <LinearLayout + android:id="@+id/optionsRow" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="2dp" + android:gravity="center" + android:orientation="horizontal"> + + <androidx.appcompat.widget.AppCompatCheckBox + android:id="@+id/monoCheckbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/mono_recording" + android:text="@string/mono_short" + android:textColor="@color/text_secondary" + android:textSize="13sp" /> + + <androidx.appcompat.widget.AppCompatCheckBox + android:id="@+id/silenceCheckbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="10dp" + android:contentDescription="@string/silence_recording" + android:text="@string/silence_short" + android:textColor="@color/text_secondary" + android:textSize="13sp" /> + </LinearLayout> + + <TextView + android:id="@+id/statusText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="6dp" + android:gravity="center" + android:text="@string/status_idle" android:textColor="@color/text_secondary" - android:textSize="13sp" /> - </LinearLayout> + android:textSize="14sp" /> - <TextView - android:id="@+id/statusText" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:gravity="center" - android:text="@string/status_idle" - android:textColor="@color/text_secondary" - android:textSize="14sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/optionsRow" /> - - <TextView - android:id="@+id/footerText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginBottom="10dp" - android:alpha="0.6" - android:text="@string/footer" - android:textColor="@color/text_secondary" - android:textSize="11sp" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - -</androidx.constraintlayout.widget.ConstraintLayout> + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginTop="20dp" + android:layout_marginBottom="14dp" + android:background="@color/divider" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/recordings_title" + android:textColor="@color/text_primary" + android:textSize="18sp" + android:textStyle="bold" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="2dp" + android:text="@string/recordings_subtitle" + android:textColor="@color/text_secondary" + android:textSize="12sp" /> + + <LinearLayout + android:id="@+id/recordingsContainer" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="6dp" + android:orientation="vertical" /> + + <TextView + android:id="@+id/emptyText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="12dp" + android:gravity="center" + android:text="@string/recordings_empty" + android:textColor="@color/text_secondary" + android:textSize="14sp" + android:visibility="gone" /> + + <TextView + android:id="@+id/footerText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="20dp" + android:alpha="0.6" + android:text="@string/footer" + android:textColor="@color/text_secondary" + android:textSize="11sp" /> + + </LinearLayout> +</ScrollView> |
