Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the function setLevel() does not work #15

Open
David13579246810 opened this issue Apr 19, 2019 · 3 comments
Open

the function setLevel() does not work #15

David13579246810 opened this issue Apr 19, 2019 · 3 comments

Comments

@David13579246810
Copy link

   Here is my code 

   ImageView image1 = findViewById(R.id.image1);  //my battery image
    Drawable mWaveDrawable = new WaveDrawable(image1.getDrawable());
    mWaveDrawable.setLevel(35);
    image1.setImageDrawable(mWaveDrawable);
   
    The water level of my image is 0

Screenshot_2019-04-19-19-09-11-934_com example wa
.I can not get a fixed 35 level.

@foroughM
Copy link

I also have this problem

@Gredicer
Copy link

Gredicer commented Dec 21, 2019

I figured it out: you should setImageDrawable() first
For example:

  image1.setImageDrawable(mWaveDrawable);
   mWaveDrawable.setLevel(35);

@Gredicer
Copy link

Gredicer commented Dec 21, 2019

And the Level Max naximum is 10000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants