Commit d33f9b18 by 万齐军

feat: 音频动画修改

parent 64f00069
......@@ -51,16 +51,21 @@
<com.yidianling.common.view.ui.VoicePlayingIcon
android:id="@+id/voicePlay"
android:layout_width="76dp"
android:layout_height="76dp"
android:padding="24dp"
android:layout_width="60dp"
android:layout_height="28dp"
android:layout_marginBottom="37dp"
android:paddingLeft="22dp"
android:paddingTop="6dp"
android:paddingRight="22dp"
android:paddingBottom="6dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/videoView"
app:layout_constraintBottom_toTopOf="@+id/tvName"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shape="@{1}"
app:shapeBg="@{0x99000000}" />
app:shapeBg="@{0x26000000}"
app:shapeRadius="@{14}"
app:shapeStrokeColor="@{0xE6FFFFFF}"
app:shapeStrokeWidth="@{1}" />
<View
android:id="@+id/vDisableClick"
......@@ -79,10 +84,10 @@
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:maxHeight="10dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="0dp"
android:paddingTop="8dp"
android:paddingEnd="0dp"
android:paddingBottom="8dp"
android:progressDrawable="@drawable/confide_seekbar_style"
android:splitTrack="false"
android:thumb="@drawable/confide_seekbar_thumb"
......@@ -164,10 +169,10 @@
android:id="@+id/confide_first_free"
android:layout_width="@dimen/platform_dp_64"
android:layout_height="@dimen/platform_dp_34"
android:visibility="@{item.showFreeTag?View.VISIBLE:View.GONE}"
app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70"
android:visibility="@{item.showFreeTag?View.VISIBLE:View.GONE}"
app:layout_constraintCircleRadius="70dp"/>
app:layout_constraintCircleRadius="70dp" />
<TextView
android:id="@+id/tvTag"
......@@ -289,8 +294,8 @@
android:layout_height="wrap_content"
android:layout_marginRight="18dp"
android:layout_marginBottom="20dp"
android:orientation="vertical"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/btnEvaluate"
app:layout_constraintRight_toRightOf="parent">
......
......@@ -45,9 +45,6 @@ public class VoicePlayingIcon extends View implements Runnable {
//控制开始/停止
private boolean isPlaying = false;
//子线程
private Thread myThread;
//指针波动速率
private int pointerSpeed;
......@@ -68,7 +65,7 @@ public class VoicePlayingIcon extends View implements Runnable {
pointerColor = ta.getColor(R.styleable.VoicePlayingIcon_pointer_color, Color.WHITE);
pointerNum = ta.getInt(R.styleable.VoicePlayingIcon_pointer_num, 3);//指针的数量,默认为4
pointerWidth = dp2px(getContext(),
ta.getFloat(R.styleable.VoicePlayingIcon_pointer_width, 6f));//指针的宽度,默认5dp
ta.getFloat(R.styleable.VoicePlayingIcon_pointer_width, 1.5f));//指针的宽度,默认5dp
pointerSpeed = ta.getInt(R.styleable.VoicePlayingIcon_pointer_speed, 40);
ta.recycle();
init();
......@@ -79,7 +76,7 @@ public class VoicePlayingIcon extends View implements Runnable {
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.VoicePlayingIcon);
pointerColor = ta.getColor(R.styleable.VoicePlayingIcon_pointer_color, Color.RED);
pointerNum = ta.getInt(R.styleable.VoicePlayingIcon_pointer_num, 3);
pointerWidth = dp2px(getContext(), ta.getFloat(R.styleable.VoicePlayingIcon_pointer_width, 6f));
pointerWidth = dp2px(getContext(), ta.getFloat(R.styleable.VoicePlayingIcon_pointer_width, 1.5f));
pointerSpeed = ta.getInt(R.styleable.VoicePlayingIcon_pointer_speed, 40);
ta.recycle();
init();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment