I'd like to know what is the exact range of the radius in the shadowRadius
property. In the documentation, they only say this value must be a float. That's fine but what is the range for the radius in Android? I mean, how do I set a 120º radius for instance?
Same problem for the visibility for TextView
. In the documentation, they say I have to set a #aarrggbb
hexadecimal color code. That's fine but again, what is the range for the visibility in Android? The value 100 (= 64 in hexadecimal) doesn't correspond at all开发者_C百科 to a maximum opacity. So what are the minimum / maximum opacities in Android?
There is an undocumented range-limit on the shadowRadius
property on some devices: 0-25.
If you exceed 25 on the Lenovo A3500 tablet for example, the following will show up in LogCat:
E/rsC++(14127): RS CPP error: Blur radius out of 0-25 pixel bound
E/rsC++(14127): RS CPP error (masked by previous error): Allocation creation failed
E/rsC++(14127): RS CPP error (masked by previous error): Allocation creation failed
And your app will terminate hard without throwing an exception that you could react to.
Gotta love the way Android handles these things...
(Also see this question: Android - Signal 11, RS CPP error: Blur radius out of 0-25 pixel bound)
Radius is a length not an angle and the range of opacity is 00 to FF using #aarrggbb.
精彩评论