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:
parent
b8b304e4cd
commit
e89e220aa6
1 changed files with 20 additions and 1 deletions
|
|
@ -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) {}
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue