1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-19 01:04:20 +00:00

Android: fix build for API < 11 (setting layer type to none).

This commit is contained in:
Lukasz Kozakiewicz 2017-11-22 14:19:36 +01:00
parent b8b304e4cd
commit e89e220aa6

View file

@ -569,7 +569,26 @@ public class JuceAppActivity extends Activity
colorMatrix.set (colorTransform);
paint.setColorFilter (new ColorMatrixColorFilter (colorMatrix));
setLayerType (View.LAYER_TYPE_NONE, null);
java.lang.reflect.Method method = null;
try
{
method = getClass().getMethod ("setLayerType", int.class, Paint.class);
}
catch (SecurityException e) {}
catch (NoSuchMethodException e) {}
if (method != null)
{
try
{
int layerTypeNone = 0;
method.invoke (this, layerTypeNone, null);
}
catch (java.lang.IllegalArgumentException e) {}
catch (java.lang.IllegalAccessException e) {}
catch (java.lang.reflect.InvocationTargetException e) {}
}
}
//==============================================================================