Eventhandling for dummies :)



  • Hi,
    I am new to android programming and i think the answer should be quite simple for some experienced programmers:
    I am able to connect to the button and detect events for single, double and hold events, so far so good..

    But now i want my MainActivity to get informed and do some stuff when the button is pressed. What is the easiest way to do that?

    Let's assume for simplicity my project consists of only these 2 classes:

    • MainActivity.java
    • ExampleBroadcastReceiver.java (kinda copy&paste from the example)

    Thanks in advance


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.