Commit d33f9b18 by 万齐军

feat: 音频动画修改

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