I want the slide to cancel the animation as whatsapp in my application.
First, when I hold the record button, it will start recording. This part works well.
Secondly, when I move my finger in the opposite direction to the garbage substance while it is already tapping, then the “Text slide to cancel” should be moved back and the recording should pause. After a certain point, I will run the trash to open the animation. But if when moving backward, if I move forward, the text view should be set to its original position, and the recording should be played again.
My problem: I do not get any help on how to accurately display the text.
I also got help from here https://github.com/sarathnk/Audio , but I could not achieve the desired result.
This is my Java code:
holdtoRecord = (ImageView) findViewById(R.id.hold);
slider = (TextView) findViewById(R.id.slide);
holdtoRecord.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
mVideoView.pause();
onHold();
return true;
}
if (event.getAction() == MotionEvent.ACTION_UP) {
mVideoView.start();
offHold();
return true;
}
if (event.getAction() == MotionEvent.ACTION_MOVE) {
}

source
share