Invisible Button Not Working
I am trying to make an invisible button. The problem I am having is when I make the button invisible, it is no longer clickable. I am using opacity:0.0 to make the button invisible. This does not work but setting the opacity to 0.1 or higher works. My code is below, I hope someone will be able to point me in the right direction.
var b1 = Titanium.UI.createButton({
opacity:0.0,
top:20,
width:300,
height:300
});
2 Answers
-
Accepted Answer
You don't have to use a button to get a click. You could do this
var b1 = Titanium.UI.createView({ top:20, width:300, height:300 });
This would essentially create an empty view that is transparent and can receive a click event.
-
Not sure why you'd need a clickable invisible button. But, try using a transparent png file. You can set a click event handler on the image.