diff options
Diffstat (limited to 'app/src/main/res')
| -rw-r--r-- | app/src/main/res/layout/activity_main.xml | 328 | ||||
| -rw-r--r-- | app/src/main/res/layout/activity_player.xml | 39 | ||||
| -rw-r--r-- | app/src/main/res/layout/activity_recordings.xml | 54 | ||||
| -rw-r--r-- | app/src/main/res/values/strings.xml | 18 | ||||
| -rw-r--r-- | app/src/main/res/xml/file_paths.xml | 7 |
5 files changed, 229 insertions, 217 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> diff --git a/app/src/main/res/layout/activity_player.xml b/app/src/main/res/layout/activity_player.xml index 67f5284..6ba1190 100644 --- a/app/src/main/res/layout/activity_player.xml +++ b/app/src/main/res/layout/activity_player.xml @@ -76,6 +76,45 @@ </LinearLayout> <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="6dp" + android:orientation="horizontal"> + + <Button + android:id="@+id/shareButton" + style="?android:attr/buttonBarButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/action_share" /> + + <Button + android:id="@+id/renameButton" + style="?android:attr/buttonBarButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/action_rename" /> + + <Button + android:id="@+id/exportButton" + style="?android:attr/buttonBarButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/action_export" /> + + <Button + android:id="@+id/deleteButton" + style="?android:attr/buttonBarButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/action_delete" /> + </LinearLayout> + + <LinearLayout android:id="@+id/markersSection" android:layout_width="match_parent" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_recordings.xml b/app/src/main/res/layout/activity_recordings.xml deleted file mode 100644 index aff2088..0000000 --- a/app/src/main/res/layout/activity_recordings.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout 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:orientation="vertical" - android:paddingLeft="20dp" - android:paddingRight="20dp"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="24dp" - android:text="@string/recordings_title" - android:textColor="@color/text_primary" - android:textSize="26sp" - 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="13sp" /> - - <FrameLayout - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_marginTop="12dp" - android:layout_weight="1"> - - <ListView - android:id="@+id/recordingsList" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:divider="@color/divider" - android:dividerHeight="1dp" - android:scrollbars="none" /> - - <TextView - android:id="@+id/emptyText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:gravity="center" - android:text="@string/recordings_empty" - android:textColor="@color/text_secondary" - android:textSize="15sp" - android:visibility="gone" /> - </FrameLayout> - -</LinearLayout> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index dbd3535..416ce5e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">RECCoon</string> - <string name="subtitle">by wuhei · v1.3.1-alpha</string> + <string name="subtitle">by wuhei · v1.4.0-alpha</string> <string name="timer_zero">00:00</string> <string name="footer">44.1 kHz · 16-bit · PCM (WAV) · cue markers</string> @@ -34,6 +34,22 @@ <string name="saved_fmt">Saved %1$s</string> <string name="library">Recordings</string> + <string name="action_share">Share</string> + <string name="action_rename">Rename</string> + <string name="action_export">Export</string> + <string name="action_delete">Delete</string> + <string name="delete_title">Delete recording?</string> + <string name="delete_message">Delete %1$s? This cannot be undone.</string> + <string name="deleted">Recording deleted</string> + <string name="rename_title">Rename recording</string> + <string name="renamed">Recording renamed</string> + <string name="rename_failed">Could not rename the recording</string> + <string name="export_none">Transcribe the recording before exporting</string> + <string name="exported">Transcript (.txt and .srt) saved to Downloads</string> + <string name="export_failed">Export failed: %1$s</string> + <string name="err_share">Could not share this file</string> + <string name="notification_channel">Recording</string> + <string name="notification_recording">Recording audio…</string> <string name="recordings_title">Recordings</string> <string name="recordings_subtitle">Saved in Downloads · reccoon-*.wav</string> <string name="recordings_empty">No recordings yet.\nTap the record button to make one.</string> diff --git a/app/src/main/res/xml/file_paths.xml b/app/src/main/res/xml/file_paths.xml new file mode 100644 index 0000000..46d069c --- /dev/null +++ b/app/src/main/res/xml/file_paths.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<paths> + <!-- Public Downloads directory, used on Android 9 and older. --> + <external-path + name="downloads" + path="Download/" /> +</paths> |
