Android Question I need to know if button is LongClick or Not

Hishow

Member
Dear Experts

Please I need to know if a button is LongClick or NOT.

I tried this sample code but it didn't work.

Sub Activity_Touch (Action As Int, X As Float, Y As Float)
Select Action
Case Activity.ACTION_DOWN
'code
Case Activity.ACTION_MOVE
' code
Case Activity.ACTION_UP
' code
End Select
End Sub

I'm using B4XPage.

Do I need to Declare anything first?

Thank you
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please use [code]code here...[/code] tags when posting code.
There is no Activity_Touch in B4XPages and Activity_Touch is not relevant anyway.

1679893070384.png
 
Upvote 0

Hishow

Member
Thank you so much sir. I decided to use Click event. Actually, I only needed to show OR hide User password. So I used this

Show Or Hide Password:
Private Sub SignInEye1_Click
    EditText2.PasswordMode = False
    Sleep(500)
    EditText2.PasswordMode = True
    
End Sub

As shown in the attached image.

I'm okay with this.

Thank you sir
 

Attachments

  • GetPsswd.png
    GetPsswd.png
    11 KB · Views: 48
Upvote 0
Top