titanium-sdk
titanium-sdk copied to clipboard
chore: handle dynamic border radii on blur view
Example:
const win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
const backgroundView = Ti.UI.createImageView({
image: 'https://s1.directupload.eu/images/250817/ufgix5hy.jpg',
width: Ti.UI.FILL,
height: Ti.UI.FILL,
scalingMode: Ti.Media.IMAGE_SCALING_ASPECT_FILL
});
const container = Ti.UI.createView({ layout: 'vertical', top: 200 });
const effectView1 = Ti.UI.iOS.createBlurView({
width: 80,
height: 80,
top: 5,
borderRadius: [20, 20, 0, 0],
glassEffect: { style: Ti.UI.iOS.GLASS_EFFECT_STYLE_CLEAR }
});
const effectView2 = Ti.UI.iOS.createBlurView({
width: 80,
height: 80,
top: 5,
borderRadius: '20 20 0 0',
glassEffect: { style: Ti.UI.iOS.GLASS_EFFECT_STYLE_CLEAR }
});
const effectView3 = Ti.UI.iOS.createBlurView({
width: 80,
height: 80,
top: 5,
borderRadius: [20],
glassEffect: { style: Ti.UI.iOS.GLASS_EFFECT_STYLE_CLEAR }
});
const effectView4 = Ti.UI.iOS.createBlurView({
width: 80,
height: 80,
top: 5,
borderRadius: 20,
glassEffect: { style: Ti.UI.iOS.GLASS_EFFECT_STYLE_CLEAR }
});
container.add([effectView1, effectView2, effectView3, effectView4]);
backgroundView.add(container);
win.add(backgroundView);
win.open();
I'm still failing to produce the following after too much time testing this lol...
According to TiDocs, the following is the array order for independent corner radii: [TL, TR, BR, BL]
Using the following, I am unable to change the BL corner radius on BlurView:
borderRadius: [31.5, 31.5, 31.5, 0]
-
Note: Normal
Viewworks, the bottom left corner is square and all others rounded...
Can someone please confirm or dispute this?
This is valid - but I have NO IDEA why this is happening. I've debugged it yesterday as well, the values are all correctly passed from JS -> native side. In this case, we have to leave the PR open until someone finds out what's happening.