Closed pdalfarr closed 10 years ago
It works on API 15 but not on 16
Just use advice:
"Realistically, just copy MagicTextView.java & attrs.xml into your project and use them as your own."
And futher follow:
It's worked, I checked.
+1 it works
The problem is that inner shadow are drawn by using PorterDuffXfermode, and many of this operations are not supported be hardware accelerated (new APIs have this as default). So, you should disable hardware acceleration for these type of views.
in init() method you should put:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
this solved all my problems in all levels of API
I've implemented @Gilianp's fix. Thanks!
Inner shadow doesn't work when client project SDK is 14 or above (project using your library project). Changing the SDK level of the MagicTextView project to 14+ also 'deactivate' the innershadow feature.
SDK version up to 13 are ok
I suspect some other feature to be also impacted by this, but I didn't really had the time to check.
Anyway, this is really a great stuff you did :-)
Note: FYI, shadows are visible in eclipse, whatever the SDK level is.