massoudss / waveformSeekBar

Android Waveform SeekBar library
471 stars 79 forks source link

onCompltion Listener added #58

Open MudssirAhmed opened 1 year ago

MudssirAhmed commented 1 year ago

Competition listener added. I added this for some progress in UI, Developers will use this to show the progress.

Issue resolved: https://github.com/massoudss/waveformSeekBar/issues/54

MudssirAhmed commented 1 year ago

@massoudss Issue resolved.

#54

MudssirAhmed commented 1 year ago

Hey @massoudss, I pushed the changes

  1. The name of the listener changed.
  2. The position also changed.
massoudss commented 1 year ago

Another point is the listener inside onDraw method will be called hundreds of times. Is it OK for your purpose?

MudssirAhmed commented 1 year ago

No! We have to set it only once.

massoudss commented 1 year ago

So we have to find another way. A general way to determinate view is drawn is using post method. wavefrom.post( new Runnable() { @Override public void run() { // your code here } });

MudssirAhmed commented 1 year ago

Let me test and finalize it. Thanks!

MudssirAhmed commented 1 year ago

So we have to find another way. A general way to determinate view is drawn is using post method. wavefrom.post( new Runnable() { @Override public void run() { // your code here } });

I test this but it neither gives the result we want. Now I add a flag to indicate whether onComplete is called or not.

MudssirAhmed commented 1 year ago

Hey, @massoudss is the code safe for you?