This is the process of documenting the creation of the first Android app. The app is built using an easy-to-use Android application development software ADT Bundle for Windows.
1. Open Eclipse Software, the following welcome interface appears first
2. Create an Android project
3. Next step
4. Next step, make a custom icon
5. Next, set whether you need to create Activity
6. Next, create Activity setup Information
7, complete. Displays the structure of the Android project that was created successfully
8. ADT provides interface design tools
9. Now that the project has been successfully established, let's take a look at the program list:
Layout file Hello_world.xml
<relativelayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http// Schemas.android.com/tools " android:layout_width=" match_parent " android:layout_height=" Match_parent " android:paddingbottom= "@dimen/activity_vertical_margin" android:paddingleft= "@dimen/activity_ Horizontal_margin " android:paddingright=" @dimen/activity_horizontal_margin " android:paddingtop=" @dimen /activity_vertical_margin " tools:context=". Helloworldactivity "> <textview android:id=" @+id/textview1 " android:layout_width=" Wrap_ Content " android:layout_height=" wrap_content " android:text=" @string/hello_world "/></ Relativelayout>
Java file Helloworldactivity.java
Package Com.example.helloworld;import Android.os.bundle;import Android.app.activity;import android.view.Menu; public class Helloworldactivity extends Activity { @Override protected void onCreate (Bundle savedinstancestate ) { super.oncreate (savedinstancestate); Setcontentview (R.layout.hello_world); } @Override Public Boolean oncreateoptionsmenu (Menu menu) { //Inflate the menu, this adds items to the Action bar I F it is present. Getmenuinflater (). Inflate (R.menu.hello_world, menu); return true; } }
10. Run the Android app via ADT
To establish ADT:
Operation Result:
First Android App