How To know the screen is touching or not

Is there any method to find whether screen is touching or not.

1 Like

Hi, you can try to use an arrangement fill parent and the event when arrangment click or long click.

I need to change a label1 to 0 when there is no touch on screen and label1 to 1 if we touch the screen, and the label should return to zero when we take finger from screen. I Hope i explained well what i exactly need.
is there any method for that, any extension ?

So, always zero and when I touch screen set variable to one , when I remove finger variable has to go to zero again? It is right ?Or after a click you can set some time to go back to zero?

Using a card view might do the trick

You can simple use a canvas for this. It has a “when touched event”. So when touched down set label text to 1. When touched up to 0

but i cant use canvas on my project

You are lucky! 3 people are within minutes here to help. So please dont let this grow up to a chat. Give more infos about your app, the screen you are working on,a screenshot would be good to let us see where you want to add this feature und what may be the problem.


exactly this is what i want, when there is no touch it should be zero

can this same thing work on vertical arrangement ?

Yes , it is the same. I have to try but you can set a clock to change the status. Try the best for you. Variable always zero and when you touch arrangement change to one and start a clock , when clock fire set variable to zero. The second way clock always fire and set variable to zero, when touch change time interval ad set variable to one, then change again

I was trying to make a design like this

i made this using a vertical scroll arrangement along with scrollhandler extension by colintree.
There had also same event like touch down and touch up . Thanks guys for giving the logic

1 Like