Apps ac.addOnClickedListener (AC Add On Clicked Listener) - How to use it?

Hello, I am trying to make AC app and cannot figure out how to make working button. I have the button itself, but it doesn't seem to be doing anything. I noticed that all app makers use ac.addOnClickedListener in their code so I was wondering what it is and how to use it. Oh yeah also its arguments.
 
It provides a callback function that the button then uses. Arguments are first the id of the button, then the callback. Look up event-driven programming to get an idea how this is done.

The callback function needs to have arguments matching the type of button it is. Although python also has the general purpose "*args" / "**kwargs" notation that absorbs any remaining arguments, so you may see those in code.
 

Latest News

What would be the ideal raceday for you to join our Club Races?

  • Monday

    Votes: 9 16.1%
  • Tuesday

    Votes: 6 10.7%
  • Wednesday

    Votes: 8 14.3%
  • Thursday

    Votes: 8 14.3%
  • Friday

    Votes: 24 42.9%
  • Saturday

    Votes: 29 51.8%
  • Sunday

    Votes: 25 44.6%
Back
Top