Browse Source

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

tags/2021-05-28
Lukasz Kozakiewicz 7 years ago
parent
commit
e89e220aa6
1 changed files with 20 additions and 1 deletions
  1. +20
    -1
      modules/juce_core/native/java/JuceAppActivity.java

+ 20
- 1
modules/juce_core/native/java/JuceAppActivity.java 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) {}
}
}
//==============================================================================


Loading…
Cancel
Save