O'Reilly logo

Android Development Tools for Eclipse by Sanjay Shah, Khirulnizam Abd Rahman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Widget interactions through the source code editor

The layout we designed previously does not have to interact with each other automatically; let's make it happen. To put in simple words, when we execute the project, clicking on the button on the app will not trigger any action. We need to add the code for the interactions.

What we are trying to do is when the user taps on the button Display Name!, the app will capture any text inside the TextView and produce a simple popup to display your name.

To achieve our goal let's play around, go to src, double click on the package folder and double click again on the file MainActivity.java. This Java file will contain the code to load the layout of the XML file main_activity.xml in order to create a UI. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required