Android Programming-Activity Lecture 4. Activity Inside java folder Public class MainActivity extends ActionBarActivity(Ctrl + Click will give you the.

Slides:



Advertisements
Similar presentations
Programming with Android: Activities
Advertisements

CSE2102 Introduction to Software Engineering Lab 2 Sept/4/2013.
Programming with Android: Activities
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
The Android Activity Lifecycle. Slide 2 Introduction Working with the Android logging system Rotation and multiple layouts Understanding the Android activity.
The Activity Class 1.  One application component type  Provides a visual interface for a single screen  Typically supports one thing a user can do,
@2011 Mihail L. Sichitiu1 Android Introduction Communication between Activities.
Programming with Android: Android Fragments Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
Multimedia.
Getting Started with Android APIs Ivan Wong. Motivation - “Datasheet” - Recently exposed to what’s available in Android - So let’s see what API’s are.
ANDROID UI – FRAGMENTS. Fragment  An activity is a container for views  When you have a larger screen device than a phone –like a tablet it can look.
1 Mobile Computing Java, Android, and Eclipse Copyright 2015 by Janson Industries.
Android Mobile computing for the rest of us.* *Prepare to be sued by Apple.
Android Activities 1. What are Android Activities? Activities are like windows in an Android application An application can have any number of activities.
로봇 모니터링 2/2 UNIT 21 로봇 SW 콘텐츠 교육원 조용수. 학습 목표 Broadcasting Service 2.
Copyright© Jeffrey Jongko, Ateneo de Manila University Of Activities, Intents and Applications.
Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml.
Android – Fragments L. Grewe.
Noname. Conceptual Parts States of Activities Active Pause Stop Inactive.
로봇 모니터링 1/2 UNIT 20 로봇 SW 콘텐츠 교육원 조용수. 학습 목표 Message Queue Handler 2.
Activity 생명주기 UNIT 13 로봇 SW 콘텐츠 교육원 조용수. 학습 목표 Logcat 액티비티 생명주기를 설명할 수 있다. 현재 상태를 저장할 수 있다. 2.
Maps Dr. David Janzen Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Activity Android Club Agenda Hello Android application Application components Activity StartActivity.
데이터 저장 & Fragment UNIT 28 로봇 SW 콘텐츠 교육원 조용수. 데이터 저장 & Fragment SharedPreference 로 데이터 저장 Fragment 의 이해 2.
Android Boot Camp Demo Application – Part 1. Development Environment Set Up Download and install Java Development Kit (JDK) Download and unzip Android.
Android: “Dynamic” data and Preferences data.
Android Application Lifecycle and Menus
Activity ANDROID CLUB Сегодня  Основные компоненты Android  Activity  Layout для Activity  Создание Activity  Launcher Activity  Activity.
Android Alert Dialog. Alert Dialog Place Button to open the dialog. public class MainActivity extends ActionBarActivity { private static Button button_sbm;
Lecture 4: Sensors Topics: Motion, Position, and Environmental Sensors Date: Feb 11, 2016.
Google map v2.
Activities and Intents Chapter 3 1. Objectives Explore an activity’s lifecycle Learn about saving and restoring an activity Understand intents and how.
Lecture 5: Location Topics: Google Play Services, Location API Date: Feb 16, 2016.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
Android Development Grant
Lecture 4: Sensors Topics: Motion, Position, and Environmental Sensors
Lecture 5: Location Topics: Google Play Services, Location API
Introduction to android
Lab7 – Advanced.
Concurrency in Android
Lecture 5: Location Topics: Google Play Services, Location API.
Activity and Fragment.
Java Examples Embedded System Software
Broadcast receivers.
Adapting to Display Orientation
Basic Activities and Intents
Fragment ?.
CS499 – Mobile Application Development
Mobile Application Development BSCS-7 Lecture # 6
Lecture 4: Sensors Topics: Motion, Position, and Environmental Sensors.
Communication between Activities
CS499 – Mobile Application Development
Picasso Revisted.
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
Activity Lifecycle Fall 2012 CS2302: Programming Principles.
CMPE419 Mobile Application Development
UNIT 08 그림책 만들기 2/2 로봇 SW 콘텐츠 교육원 조용수.
BMI Android Application will take weight and height from the users to calculate Body Mass Index (BMI) with the information, whether user is underweight,
Activities and Intents
CIS 470 Mobile App Development
Activity Lifecycle.
CIS 493/EEC 492 Android Sensor Programming
Lecture 5: Location Topics: Google Play Services, Location API.
Service Services.
SE4S701 Mobile Application Development
Activities, Fragments, and Intents
Mobile Programming Broadcast Receivers.
CIS 694/EEC 693 Android Sensor Programming
Presentation transcript:

Android Programming-Activity Lecture 4

Activity Inside java folder Public class MainActivity extends ActionBarActivity(Ctrl + Click will give you the base class) ActionBarActivity extends from FragmentActivity FragmentActivity extends from Activity class.

Activity LifeCyacle OnCreate() // Overriding it. Layout Launching. //setContentView(R.layout.activity_main) OnStart() onResume() onPause() onStop() onDestroy()

Android Activity Lifecycle State change Example import android.util.Log;//Login msgs to console. public class MainActivity extends ActionBarActivity { private static final String MY_TAG = “message"; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.i(MY_TAG,"onCreate"); }

protected void onStart() { super.onStart(); Log.i(MY_TAG, "onStart"); } protected void onResume() { super.onResume(); Log.i(MY_TAG, "onResume"); }

protected void onPause() { super.onPause(); Log.i(MY_TAG, "onPause"); } protected void onStop() { super.onStop(); Log.i(MY_TAG, "onStop"); }

protected void onDestroy() { super.onDestroy(); Log.i(MY_TAG, "onDestroy"); } To run Activity_main.xml Select Combo box ->EditFilterConfiguration Paste the msg in LogTag Category

References oid/app/Activity.html#ActivityLifecycle