[Modify]声音签名功能完善
This commit is contained in:
@@ -128,6 +128,15 @@ class UserInfoModifyActivity : BaseViewBindingActivity<ActivityUserInfoModifyBin
|
||||
} else {
|
||||
binding.rvPhotos.visibility = View.GONE
|
||||
}
|
||||
val hasSound = (userInfo.audioCard?.second ?: 0) > 0
|
||||
if (hasSound) {
|
||||
binding.tvSoundTip.visibility = View.GONE
|
||||
binding.llAudio.visibility = View.VISIBLE
|
||||
binding.tvAudio.text = userInfo.audioCard.second.toString()
|
||||
}else{
|
||||
binding.tvSoundTip.visibility = View.VISIBLE
|
||||
binding.llAudio.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,6 +398,9 @@ class UserInfoModifyActivity : BaseViewBindingActivity<ActivityUserInfoModifyBin
|
||||
audioFileUrl = it.getStringExtra(SoundSignatureActivity.AUDIO_FILE)
|
||||
val audioDuration = it.getIntExtra(SoundSignatureActivity.AUDIO_DURA, 0)
|
||||
|
||||
binding.tvSoundTip.visibility = View.GONE
|
||||
binding.llAudio.visibility = View.VISIBLE
|
||||
binding.tvAudio.text = audioDuration.toString()
|
||||
// // 更新用户信息
|
||||
// val user = UserInfo()
|
||||
// user.uid = AuthModel.get().currentUid
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/bg_sound.webp
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_sound.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22"
|
||||
@@ -43,16 +44,15 @@
|
||||
android:src="@drawable/default_avatar" />
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
android:layout_width="55dp"
|
||||
android:id="@+id/iv_avatar_auditing"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@id/civ_avatar"
|
||||
android:layout_alignRight="@id/civ_avatar"
|
||||
android:layout_alignBottom="@id/civ_avatar"
|
||||
android:visibility="visible"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_avatar_auditing"
|
||||
/>
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
<ImageView
|
||||
@@ -111,9 +111,9 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15">
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -276,24 +276,44 @@
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
android:gravity="center_vertical|end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSoundTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:hint="@string/label_record_your_own_voice"
|
||||
android:textColor="@color/color_6D6B89"
|
||||
android:textColorHint="@color/color_6D6B89" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_sound_signature"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/llAudio"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:background="@drawable/bg_sound"
|
||||
android:gravity="center_vertical|end"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sound_tip"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvAudio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:hint="@string/label_record_your_own_voice"
|
||||
android:textColor="@color/color_6D6B89"
|
||||
android:textColorHint="@color/color_6D6B89" />
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="60" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:text="''"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -5046,5 +5046,6 @@
|
||||
<string name="user_birthday">生日:</string>
|
||||
<string name="user_room">房間:</string>
|
||||
<string name="user_association">公會:</string>
|
||||
<string name="sound_duration">%d"</string>
|
||||
|
||||
</resources>
|
@@ -293,7 +293,7 @@ public class UserInfo implements Serializable {
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
private SoundBean soundBean;
|
||||
private SoundBean audioCard;
|
||||
|
||||
/**
|
||||
* "用户自己的房间是否牌照房"
|
||||
|
Reference in New Issue
Block a user