This is a quick demonstration of creating your first Android UI Hello World application. For this demonstration we will be using the XAP-Player. The XAP-Player allows you to quickly develop and test Android apps without the need of the Android SDK installation.
- Select from the menu: File - New Project
- Select your preferred Language on the left side
- Select “UI (Android User Interface)” as Project Type
- Enter a “myandroidapp” as Project Name
- Click on the “Create” button
LA.Developer will create your main project file and the mainform designer files and prepare the project to compile in UI mode.
6. Select at the bottom the Designer tab
7. Select on the left side, in the Toolbox, the Button control
8. Click anywhere on the Designer Form to create a Button on the Form
9. In the Inspector change the Text property of the Button to “Click Me"
10. Select the Events tab in the Inspector and click on the Event “OnClick"
11. Scroll in the Code Editor to the generated event declaration and enter the folowing code
Basic Dialect: TAForm(Sender.Owner).ShowMessage("Hello World") C++, JScript Dialect: TAForm(Sender.Owner).ShowMessage("Hello World"); Pascal Dialect: TAForm(Sender.Owner).ShowMessage('Hello World');
12. If you have not already delpoy XAP-Player to your device
13. Run the project by selecting from the menu: Project - Run
14. Click on the “Run and Deploy XAP” button to deploy and run your app on the Android Device
As you can see, it works.