gelitenight / WaveView

waveview for android
Apache License 2.0
1.59k stars 325 forks source link

Why can't I set WaveView opaque? #5

Closed nantofu closed 8 years ago

nantofu commented 9 years ago

I want to set WaveView opaque. I have set up the Alpha of wavePaint1 to 255. But no matter what i do, View is still transparent. Do you have some good method?

Like this(the red view should be opaque). image

gelitenight commented 8 years ago

It's a bug which can be fixed by adding:

wavePaint.setStrokeWidth(2);

The fix is included in latest commit.

nantofu commented 8 years ago

Thanks,I have found the method. But I want to know why the Stroke Width can influence the alpha of drawable?

gelitenight commented 8 years ago

@nantofu I'm confused with that too. It seems to be a bug with Android 4.x and below, because the code without Stroke Width set worked well with my phone running Android 5.0 and Android 6.0