Page 21

Android Programming Cookbook

13 / 143

Figure 1.10: Add an activity to Mobile. Choose: Add no activity. Now, our project has just been created!


Create the source code of a simple FirstAndroidApplication Activity

Add a new Java class Activity inside src/com.javacodegeeks.FirstAndroidApplication/ so that we are going to have the src/com.javacodegeeks.FirstAndroidApplication/ file and paste the code below. package com.javacodegeeks.FirstAndroidApplication; import; import android.os.Bundle; public class FirstActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_layout); } }


This is Yahya Christian School Magazine

Read more
Read more
Similar to
Popular now
Just for you