Open top menu

Activity


The activity is a user interface. Your project Src / directory based upon the java package you used when you created the project (com.yourpackgename.myapp).
the root à src/packge/Myactivity.java .

package com.example.addgooglemap;

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

public class MyActivity extends Activity{
       @Override
       protected void onCreate(Bundle savedInstanceState) {
              // TODO Auto-generated method stub
              super.onCreate(savedInstanceState);
       
 // set user interface
              setContentView(R.layout. my_activity);
       }

}

User interface inside  res/Layout/my_activity.xml.

 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
   


</LinearLayout>
Tagged

0 comments