PDA

View Full Version : toggle button - suggest



fother
10 Jul 2009, 11:26 AM
create 5 toggle button and set the same toggle group..

click in the first toggle button.. will call the listener toggle for all toggle button.. isnt a good ideia

should be call a toggle listener for the "toggle pressed" and the "toggle that was pressed" :)

for example:
click in toggle 1
toggle 1 = will pressed - call the listener toggle
toggle 2 = not pressed - do nothing
toggle 3 = not pressed - do nothing
toggle 4 = not pressed - do nothing
toggle 5 = not pressed - do nothing

click in toggle 2
toggle 1 = was pressed - call the listener toggle
toggle 2 = will pressed - call the listener toggle
toggle 3 = not pressed - do nothing
toggle 4 = not pressed - do nothing
toggle 5 = not pressed - do nothing

click in toggle 3
toggle 1 = not pressed - do nothing
toggle 2 = was pressed - call the listener toggle
toggle 3 = will pressed - call the listener toggle
toggle 4 = not pressed - do nothing
toggle 5 = not pressed - do nothing

click in toggle 4
toggle 1 = not pressed - do nothing
toggle 2 = not pressed - do nothing
toggle 3 = was pressed - call the listener toggle
toggle 4 = will pressed - call the listener toggle
toggle 5 = not pressed - do nothing

:D