Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
baijihui416 committed Jun 8, 2016
1 parent 10428d2 commit 8611153
Show file tree
Hide file tree
Showing 24 changed files with 10 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ public void onFinish(float seconds, String filePath) {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (animView != null) {
animView.setBackgroundResource(R.drawable.com1314080901103_adj);
animView.setBackgroundResource(R.drawable.com1314080901101_adj);
animView = null;
}
//播放动画
animView = view.findViewById(R.id.recorder_anim);
animView.setBackgroundResource(R.drawable.com1314080901103_play_anim);
animView.setBackgroundResource(R.drawable.com1314080901101_play_anim);
AnimationDrawable anim = (AnimationDrawable) animView.getBackground();
anim.start();
//播放音频
MediaManager.playSound(mDatas.get(position).filePath, new MediaPlayer.OnCompletionListener() {

@Override
public void onCompletion(MediaPlayer mp) {
animView.setBackgroundResource(R.drawable.com1314080901103_adj);
animView.setBackgroundResource(R.drawable.com1314080901101_adj);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package edu.hzuapps.androidworks.homework.com1314080901101;
package edu.hzuapps.androidworks.homework.com1314080901101;

import android.content.Context;
import android.util.DisplayMetrics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,18 @@ private void changeState(int state) {
mCurState = state;
switch (state) {
case STATE_NORMAL:
setBackgroundResource(R.drawable.com1314080901103_button_recorder_normal);
setBackgroundResource(R.drawable.com1314080901101_button_recorder_normal);
setText(R.string.str_recorder_normal);
break;
case STATE_RECORDING:
setBackgroundResource(R.drawable.com1314080901103_button_recorder);
setBackgroundResource(R.drawable.com1314080901101_button_recorder);
setText(R.string.str_recorder_recorder);
if (isRecording) {
mDialogManger.recording();
}
break;
case STATE_WANT_TO_CANCEL:
setBackgroundResource(R.drawable.com1314080901103_button_recorder);
setBackgroundResource(R.drawable.com1314080901101_button_recorder);
setText(R.string.str_recorder_want_cancel);
mDialogManger.wantToCancel();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void recording() {
mVoice.setVisibility(View.VISIBLE);
mLable.setVisibility(View.VISIBLE);

mIcon.setImageResource(R.drawable.com1314080901103_recorder);
mIcon.setImageResource(R.drawable.com1314080901101_recorder);
mLable.setText("手指上滑,取消发送");
}
}
Expand All @@ -57,7 +57,7 @@ public void wantToCancel() {
mVoice.setVisibility(View.GONE);
mLable.setVisibility(View.VISIBLE);

mIcon.setImageResource(R.drawable.com1314080901103_cancel);
mIcon.setImageResource(R.drawable.com1314080901101_cancel);
mLable.setText("松开手指,取消发送");
}
}
Expand All @@ -71,7 +71,7 @@ public void tooShort() {
mVoice.setVisibility(View.GONE);
mLable.setVisibility(View.VISIBLE);

mIcon.setImageResource(R.drawable.com1314080901103_voice_to_short);
mIcon.setImageResource(R.drawable.com1314080901101_voice_to_short);
mLable.setText("录音时间过短");
}
}
Expand Down
Binary file removed app/src/main/res/drawable/com1314080901103_adj.png
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 0 additions & 6 deletions app/src/main/res/drawable/com1314080901103_play_anim.xml

This file was deleted.

Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v1.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v2.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v3.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v4.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v5.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v6.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v7.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v_anim1.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_v_anim2.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable/com1314080901103_xy.png
Binary file not shown.

0 comments on commit 8611153

Please sign in to comment.