java - Android: Disable checkboxes without graphical change? -
is possible -subject-? right if set checkboxinstance.setenabled(false);
checkbox gets "disabled graphics", grayed out , more transparent. trying same, need keep checkbox active-looking.
the reason have onclicklistener on parent element. works alright seems when checkbox touched, checkbox gets un/checked without firing off listener of parent (and of course fire always).
thanks!
edit: looking (code in as3, of course there no graphics wouldn't work ...but theory):
var s:sprite = new sprite(); var cb:sprite = new sprite(); //let's assume checkbox s.addchild(cb); //cb inside of s addchild(s); //s added display list s.mousechildren = false; s.addeventlistener(mouseevent.click, fireclick); //cb have mouse listener well, nothing happen s.mousechildren set false
gosh, easy... setclickable(false)
or android:clickable="false"
. that's it.
Comments
Post a Comment