diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java index 1dd014ad105..0311cee59bd 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java @@ -2210,7 +2210,9 @@ protected void setOnLongClickListener(View view) protected void disableHWAcceleration() { - if (this.borderView != null) { + if (this.borderView != null && !(proxy.hasProperty("keepHardwareMode") + && TiConvert.toBoolean(proxy.getProperty("keepHardwareMode"), false)) + ) { this.borderView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } } diff --git a/apidoc/Titanium/UI/View.yml b/apidoc/Titanium/UI/View.yml index 478e44fb812..0c5304404dc 100644 --- a/apidoc/Titanium/UI/View.yml +++ b/apidoc/Titanium/UI/View.yml @@ -1555,6 +1555,15 @@ properties: Defaults to `undefined`. type: [Number,String] + - name: keepHardwareMode + summary: A value indicating the render mode of the View + description: | + Set to true to keep hardware mode when using a border and transparent backgrounds. + type: Boolean + default: false + platforms: [android] + since: {android: "13.1.0"} + - name: layout type: String summary: |