Java Question java.lang.IllegalArgumentException: background is null.

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Hello all ,

I am trying to wrap this project https://github.com/fanrunqi/WaveProgressView but can not find a way to solve this error which crashes the app too .
It might be something related to resource xml files but I could not find a helpful tutorial or information .
I upload compiled library , source code and B4a Example

Thanks in advance
 

Attachments

  • WaveProgressViewCompiledLib.zip
    7 KB · Views: 246
  • waveprogressSource.zip
    14.2 KB · Views: 260
  • waveprogressviewb4aexample.zip
    2 KB · Views: 247

DonManfred

Expert
Licensed User
Longtime User
- the example does not compile. the initialze is missing a parameter (bitmap)
- But the source does not have this parameter in initialize!?

Additional you are setting a null to the bitmap in initialize of the wrapper
B4X:
        cv = new WaveProgressView(ba.context, null);

The app crashes because the background is null

 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
- the example does not compile. the initialze is missing a parameter (bitmap)
- But the source does not have this parameter in initialize!?
Sorry for that , I tried passing bitmap to the library , set it as background and that worked but I don't think that is the right way to create a library with resources.
I changed that later but I think I forgot to recompile .
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
I cant get it to work :-(

I tried to do a complete new wrap... The same

Here is the latest compiled version
I modified the original library to be able to set background bitmap .
I do not know how to fix pixelated result issue .
 

Attachments

  • WaveProgressView.zip
    6.8 KB · Views: 270
Cookies are required to use this site. You must accept them to continue using the site. Learn more…