[Modify]声音录制页面开发

This commit is contained in:
wushaocheng
2023-01-04 20:38:31 +08:00
parent d4cbe57d6c
commit 94adc146da
10 changed files with 118 additions and 3 deletions

View File

@@ -948,6 +948,11 @@
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".audio.SoundSignatureActivity"
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
android:exported="false"
android:screenOrientation="portrait" />
<meta-data
android:name="notch.config"

View File

@@ -9,7 +9,6 @@ import android.content.Context;
import android.graphics.Color;
import android.net.http.HttpResponseCache;
import android.os.Build;
import android.os.Environment;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;

View File

@@ -0,0 +1,11 @@
package com.yizhuan.erban.audio
import com.yizhuan.erban.base.BaseViewBindingActivity
import com.yizhuan.erban.databinding.ActivitySoundSignatureBinding
class SoundSignatureActivity : BaseViewBindingActivity<ActivitySoundSignatureBinding>() {
override fun init() {
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,95 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".audio.SoundSignatureActivity">
<com.yizhuan.erban.base.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_30"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ivSoundTranscribe"
android:layout_width="180dp"
android:layout_height="180dp"
android:layout_marginTop="78dp"
android:src="@drawable/bg_sound_transcribe"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_bar" />
<com.opensource.svgaplayer.SVGAImageView
android:id="@+id/svgRecorder"
android:layout_width="110dp"
android:layout_height="110dp"
app:layout_constraintBottom_toBottomOf="@+id/ivSoundTranscribe"
app:layout_constraintEnd_toEndOf="@+id/ivSoundTranscribe"
app:layout_constraintStart_toStartOf="@+id/ivSoundTranscribe"
app:layout_constraintTop_toTopOf="@+id/ivSoundTranscribe"
tools:src="@drawable/ic_sound_record" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvSoundTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_30"
android:text="@string/sound_time"
android:textColor="@color/text_title_color"
android:textSize="@dimen/sp_14"
app:layout_constraintEnd_toEndOf="@+id/ivSoundTranscribe"
app:layout_constraintStart_toStartOf="@+id/ivSoundTranscribe"
app:layout_constraintTop_toBottomOf="@+id/ivSoundTranscribe" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvTip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_15"
android:text="@string/good_voice_brings_more_attention"
android:textColor="@color/color_B3B3C3"
android:textSize="@dimen/sp_14"
app:layout_constraintEnd_toEndOf="@+id/ivSoundTranscribe"
app:layout_constraintStart_toStartOf="@+id/ivSoundTranscribe"
app:layout_constraintTop_toBottomOf="@+id/tvSoundTime" />
<FrameLayout
android:id="@+id/frPlayBg"
android:background="@drawable/bg_ffffff_r360"
android:layout_width="64dp"
android:layout_height="64dp"
android:elevation="1dp"
app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintEnd_toEndOf="@+id/ivSoundTranscribe"
app:layout_constraintStart_toStartOf="@+id/ivSoundTranscribe"
app:layout_constraintTop_toBottomOf="@+id/tvTip"
app:layout_constraintBottom_toTopOf="@+id/tvRecordTip">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ivSoundStatus"
android:layout_width="@dimen/dp_28"
android:layout_height="@dimen/dp_28"
android:layout_gravity="center"
android:src="@drawable/ic_start_record" />
</FrameLayout>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvRecordTip"
android:text="@string/hit_start_record"
android:textSize="@dimen/sp_14"
android:textColor="@color/color_6D6B89"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_15"
app:layout_constraintTop_toBottomOf="@+id/frPlayBg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/frPlayBg"
app:layout_constraintEnd_toEndOf="@+id/frPlayBg"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -5029,5 +5029,8 @@
<string name="your_shield_list_is_empty">你的屏蔽列表為空哦!</string>
<string name="text_unmask">解除屏蔽</string>
<string name="successfully_unmasking">解除屏蔽成功</string>
<string name="sound_time">%ds/60s</string>
<string name="good_voice_brings_more_attention">好的聲音能帶來更多關注哦~</string>
<string name="hit_start_record">點擊開始錄制</string>
</resources>

View File

@@ -119,7 +119,7 @@ dependencies {
api "org.greenrobot:eventbus:${eventbusVersion}"
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api 'com.github.getActivity:ToastUtils:10.3'
api 'com.github.getActivity:ToastUtils:10.5'
api 'androidx.legacy:legacy-support-v4:1.0.0'
api 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
@@ -130,6 +130,8 @@ dependencies {
api "jp.wasabeef:glide-transformations:${GlideTransformationsVersion}"
api 'com.squareup.wire:wire-runtime:3.7.0'
}
repositories {
mavenCentral()

View File

@@ -36,7 +36,7 @@ import jp.wasabeef.glide.transformations.RoundedCornersTransformation
import java.io.File
/**
* author: create by Even on 2022/3/29
* author: create by wushaocheng on 2022/12/29
* 图片加载工具类
*/
class GlideUtils {