Click here to Skip to main content
15,885,757 members
Articles / Mobile Apps / Android

Basic structure of an Android project

Rate me:
Please Sign up or sign in to vote.
4.80/5 (4 votes)
31 May 2012CPOL4 min read 140.9K   1.7K   33  
The basic structure of an Android project and its major files and classes.
package com.kobi;


import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class MyfirstandroidprojectActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        TextView mTextView = (TextView)this.findViewById(R.id.myLabel);
        mTextView.setText("Hello my New Project");
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions