private void setBackgroundOnSurface() {
        if (isTornDown() || mNativeQuad == null) {
            return;
        }

        if (mBackgroundColor != Color.TRANSPARENT) {
            // destroy the old color material
            if (mNativeColorMaterial != null) {
                mNativeColorMaterial.dispose();
            }
            mNativeColorMaterial = new Material();
            mNativeColorMaterial.setDiffuseColor(mBackgroundColor);
            mNativeQuad.setMaterial(mNativeColorMaterial);
        } else if (mMaterials != null && mMaterials.size() > 0) {
            // set the first material on the surface
            mNativeQuad.setMaterial(mMaterials.get(0));
        } else {
            if (mNativeColorMaterial != null) {
                mNativeColorMaterial.dispose();
                mNativeColorMaterial = null;
            }
            // set the default (transparent) material if no color or material is given
            mNativeQuad.setMaterial(mDefaultMaterial);
        }
    }
Helper function which will set a material on the mNativeQuad or remove material if neither
color nor materials are given.
android/viro_bridge/src/main/java/com/viromedia/bridge/component/node/VRTFlexView.java