GithubHelp home page GithubHelp logo

Comments (7)

alxrm avatar alxrm commented on May 18, 2024 2

@okabbas or there are some properties for your convenience, check those out:

    wave.onStopTracking = {
      Log.e("wave", "Progress set: $it")
    }
    
    wave.onStartTracking = {
      Log.e("wave", "Started tracking from: $it")
    }

    wave.onProgressChanged = {progress, byUser ->
      Log.e("wave", "Progress set: $progress, and it's $byUser that user did this")
    }

from audiowave-progressbar.

alxrm avatar alxrm commented on May 18, 2024 1

Hey @okabbas, thanks for your reply, let me please check if the sample activity still works.

Whilst you may want to try to Clean+Build, if you haven't tried it yet, and check whether the issue persists or not.

from audiowave-progressbar.

alxrm avatar alxrm commented on May 18, 2024 1

@okabbas you're trying to use Java API here, you see, with kotlin you need to use properties like this:

    wave.onProgressListener = object : OnProgressListener {
      override fun onProgressChanged(progress: Float, byUser: Boolean) {
        TODO()
      }

      override fun onStartTracking(progress: Float) {
        TODO()
      }

      override fun onStopTracking(progress: Float) {
        TODO()
      }
    }

from audiowave-progressbar.

alxrm avatar alxrm commented on May 18, 2024 1

@okabbas glad to help, and I'm closing this issue since the problem's solved. Gonna update the readme in a few minutes.

from audiowave-progressbar.

abbasnaqdi avatar abbasnaqdi commented on May 18, 2024

Hello . The sample project does not work for me.
I also did the Clean + ReBuild operation, but still the problem is going wrong and I get the error below.

Error:(145, 37) Unresolved reference: setOnProgressListener

my code

        holder.itemView.wave_voice.setOnProgressListener(object : OnProgressListener {
            override fun onStartTracking(progress: Float) {
                //
            }
            override fun onStopTracking(progress: Float) {
                //
            }
            override fun onProgressChanged(progress: Float, byUser: Boolean) {
                //
            }
        });

        Observable.fromCallable {
            filebyte = getFileByte(context, voice.file)
        }.observeOn(Schedulers.newThread()).subscribeOn(AndroidSchedulers.mainThread())
                .subscribe {
                    holder.itemView.wave_voice.setRawData(filebyte)
                    holder.itemView.wave_voice.scaledData = filebyte
                }

I checked your code and found that the setOnProgressListener interface did not exist at all.

from audiowave-progressbar.

alxrm avatar alxrm commented on May 18, 2024

@okabbas woah, that's really odd, since the repository shows it's presence, give me just a bit more time, I need to update the dependencies, since I haven't touched this in a while

from audiowave-progressbar.

abbasnaqdi avatar abbasnaqdi commented on May 18, 2024

Oh my God :) It did
I did not know that. Thank you so much
Please add this code in readme file For people who might make me wrong.
Thanks for your quick response and good support

from audiowave-progressbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.