@@ -31,7 +31,7 @@ public class ENVolumeView extends View{
3131
3232 private static final int DEFAULT_LINE_COLOR = Color .WHITE ;
3333
34- private static final int DEFAULT_BG_LINE_COLOR = 0xff4f5559 ;
34+ private static final int DEFAULT_BG_LINE_COLOR = 0xff64696d ;
3535
3636 private static final int DEFAULT_LINE_WIDTH = 10 ;
3737
@@ -129,22 +129,22 @@ protected void onDraw(Canvas canvas) {
129129 super .onDraw (canvas );
130130 if (mCurrentState != STATE_VIBRATE ) {
131131 if (mFraction <= 0.5 ) {
132- mDstPath .reset ();
132+ mDstPath .reset (); //嗷~ 在这画喇叭
133133 mPathMeasure .getSegment (0 , mPathLength * 0.38f - mPathLength * 0.13f * mFraction , mDstPath , true );
134134 canvas .drawPath (mDstPath , mBgPaint );
135135 mDstPath .reset ();
136136 mPathMeasure .getSegment (mPathLength * 0.62f + mPathLength * 0.13f * mFraction , mPathLength , mDstPath , true );
137137 canvas .drawPath (mDstPath , mBgPaint );
138138
139- canvas .save ();
139+ canvas .save (); //嗷~ 在这画X
140140 canvas .translate (- mFraction * mBaseLength * 2 , 0 );
141141 canvas .drawLine (mCenterX - mBaseLength * (0.5f - mFraction ) , mCenterY - mBaseLength * (0.5f - mFraction )
142142 ,mCenterX + mBaseLength * (0.5f - mFraction ), mCenterY + mBaseLength * (0.5f - mFraction ), mBgPaint );
143143 canvas .drawLine (mCenterX - mBaseLength * (0.5f - mFraction ), mCenterY + mBaseLength * (0.5f - mFraction )
144144 ,mCenterX + mBaseLength * (0.5f - mFraction ), mCenterY - mBaseLength * (0.5f - mFraction ), mBgPaint );
145145 canvas .restore ();
146146 } else {
147- mDstPath .reset ();
147+ mDstPath .reset (); //嗷~ 在这画喇叭
148148 mPathMeasure .getSegment (0 , mPathLength * 0.25f + mPathLength * 0.13f * (mFraction - 0.5f ), mDstPath , true );
149149 canvas .drawPath (mDstPath , mBgPaint );
150150 mDstPath .reset ();
@@ -157,7 +157,7 @@ protected void onDraw(Canvas canvas) {
157157 mPathMeasure .getSegment (mPathLength - mPathLength * 0.38f / 0.5f * (mFraction - 0.5f ), mPathLength , mDstPath , true );
158158 canvas .drawPath (mDstPath , mPaint );
159159
160- canvas .save ();
160+ canvas .save (); //嗷~ 在这画小声波
161161 canvas .translate ( - (1 - mFraction ) * mBaseLength * 2 , 0 );
162162 canvas .drawArc (mCenterX - 0.5f * mBaseLength - mBaseLength / 0.5f * (mFraction - 0.5f ),
163163 mCenterY - mBaseLength / 0.5f * (mFraction - 0.5f ),
@@ -172,7 +172,7 @@ protected void onDraw(Canvas canvas) {
172172 mCenterY + mBaseLength / 0.5f * (mFraction - 0.5f ), -55 / 50 * sVolume , 110 / 50 * sVolume ,false , mPaint );
173173 canvas .restore ();
174174
175- canvas .save ();
175+ canvas .save (); //嗷~ 在这画大声波
176176 canvas .translate ( - (1 - mFraction ) * mBaseLength * 3 , 0 );
177177 canvas .drawArc (mCenterX - 1.6f * mBaseLength / 0.5f * (mFraction - 0.5f ),
178178 mCenterY - 1.6f * mBaseLength / 0.5f * (mFraction - 0.5f ),
@@ -188,14 +188,14 @@ protected void onDraw(Canvas canvas) {
188188 canvas .restore ();
189189 }
190190 } else {
191- mDstPath .reset ();
191+ mDstPath .reset (); //嗷~ 在这画喇叭
192192 mPathMeasure .getSegment (0 , mPathLength * 0.38f , mDstPath , true );
193193 canvas .drawPath (mDstPath , mPaint );
194194 mDstPath .reset ();
195195 mPathMeasure .getSegment (mPathLength - mPathLength * 0.38f , mPathLength , mDstPath , true );
196196 canvas .drawPath (mDstPath , mPaint );
197197
198- canvas .save ();
198+ canvas .save (); //嗷~ 在这画小声波
199199 canvas .translate ( - (1 - mFraction ) * mBaseLength / 3 , 0 );
200200 canvas .drawArc (mCenterX - 1.5f * mBaseLength ,
201201 mCenterY - mBaseLength ,
@@ -210,7 +210,7 @@ protected void onDraw(Canvas canvas) {
210210 mCenterY + mBaseLength , -55 / 50 * sVolume , 110 / 50 * sVolume ,false , mPaint );
211211 canvas .restore ();
212212
213- canvas .save ();
213+ canvas .save (); //嗷~ 在这画大声波
214214 canvas .translate ( - (1 - mFraction ) * mBaseLength / 3 , 0 );
215215 canvas .drawArc (mCenterX - 1.6f * mBaseLength ,
216216 mCenterY - 1.6f * mBaseLength ,
0 commit comments