Instead of having every time this recurring bunch of code to set up a simple click listener you can now just add
<Button android:onClick="myClickHandler" />to your button element in your layout's XML file.
Finally the code to handle the click is as simple as that:
class MyActivity extends Activity { public void myClickHandler(View target) { // Do stuff } }
No comments:
Post a Comment