Programming with Android: Activities

Slides:



Advertisements
Similar presentations
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Scienze dellInformazione Università di Bologna.
Advertisements

Programming with Android: Android for Tablets Luca Bedogni Marco Di Felice Dipartimento di Scienze dellInformazione Università di Bologna.
Programming with Android: Calculator Example
Programming with Android: Activities and Intents
Programming with Android: Network Operations
Programming with Android: Module Overview
Programming with Android: Android for Tablets Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
Programming with Android: Notifications, Threads, Services
Programming with Android: System Architecture
Programming with Android: Activities and Intents Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
Programming with Android: Activities and Intents Luca Bedogni Marco Di Felice Dipartimento di Informatica – Scienza e Ingegneria Università di Bologna.
Programming with Android: Widgets and Events Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
CSE2102 Introduction to Software Engineering Lab 2 Sept/4/2013.
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Android Projects Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
Fragments: Introduction Fragments were introduced in Android 3.0 to support flexible and dynamic UI designs represent portions of an application’s user.
Android Application Model (3)
Programming with Android: Activities
Android 02: Activities David Meredith
The Android Activity Lifecycle. Slide 2 Introduction Working with the Android logging system Rotation and multiple layouts Understanding the Android activity.
Android activities 1 CS300. What makes an app?  Activities: presentation layer  Services: invisible workers  Content Providers: databases  Intents:
The Activity Class 1.  One application component type  Provides a visual interface for a single screen  Typically supports one thing a user can do,
Android Fragments.
Android Life Cycle CS328 Dick Steflik. Life Cycle The steps that an application goes through from starting to finishing Slightly different than normal.
More on User Interface Android Applications. Layouts Linear Layout Relative Layout Table Layout Grid View Tab Layout List View.
Programming with Android: System Architecture
Programming with Android: System Architecture
Programming with Android: Android Fragments Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
CS378 - Mobile Computing Anatomy of an Android App and the App Lifecycle.
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.
Android Mobile computing for the rest of us.* *Prepare to be sued by Apple.
Android Info mostly based on Pro Android 3.  User Applications  Java Libraries – most of Java standard edition ◦ Activities/Services ◦ UI/Graphics/View.
Activities and Intents. Activities Activity is a window that contains the user interface of your application,typically an application has one or more.
Copyright© Jeffrey Jongko, Ateneo de Manila University Of Activities, Intents and Applications.
10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Introduction to Android Overview of Android System Android Components Component.
Android Programming-Activity Lecture 4. Activity Inside java folder Public class MainActivity extends ActionBarActivity(Ctrl + Click will give you the.
Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml.
Android – Fragments L. Grewe.
Mobile Programming Lecture 5 Composite Views, Activities, Intents and Filters.
Noname. Conceptual Parts States of Activities Active Pause Stop Inactive.
1 CMSC 628: Introduction to Mobile Computing Nilanjan Banerjee Introduction to Mobile Computing University of Maryland Baltimore County
Activities Димитър Н. Димитров Astea Solutions AD.
Activities and Intents Chapter 3 1. Objectives Explore an activity’s lifecycle Learn about saving and restoring an activity Understand intents and how.
Android Fragments. Slide 2 Lecture Overview Getting resources and configuration information Conceptualizing the Back Stack Introduction to fragments.
Activity and Fragment.
Programming with Android:
Basic Activities and Intents
Fragment ?.
Fragments: Introduction
Mobile Application Development BSCS-7 Lecture # 6
Mobile Applications (Android Programming)
Activities and Intents
Anatomy of an Android App and the App Lifecycle
Widgets & Fragments Kalin Kadiev Astea Solutions AD.
Android Mobile Application Development
The Android Activity Lifecycle
ANDROID UI – FRAGMENTS UNIT II.
Android training in Chandigarh. What is ADB ADB stands for Android Debug Bridge. It is a command line tool that is used to communicate with the emulator.
Anatomy of an Android App and the App Lifecycle
Activity Lifecycle Fall 2012 CS2302: Programming Principles.
Android Topics Android Activity Lifecycle and Experiment Toast
Activities and Intents
HNDIT2417 Mobile Application Development
Activity Lifecycle.
Activities and Intents
Objects First with Java
SE4S701 Mobile Application Development
Activities and Fragments
Korea Software HRD Center
Activities, Fragments, and Intents
Presentation transcript:

Programming with Android: Activities Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna 1 1

Activity Outline: What is started by the device It contains the application's informations Has method to answer certain events An application could be composed of multiple activities 2

Create a class that is a subclass of Activity Creating an activity Create a class that is a subclass of Activity Implement callback methods OnCreate(): Initialize SetContentView() 3

Activity lifecycle 4

Activity lifecycle OnCreate() Called when the activity is created Should contain the initialization operations Has a Bundle parameter If onCreate() succesfull terminates, it calls onStart() 5

Activity lifecycle OnStart() Called when onCreate() terminates Called right before it is visible to user If it has the focus, then onResume() is called If not, onStop() is called 6

Activity lifecycle OnResume() Called when the activity is ready to get input from users Called when the activity is resumed too If it succesfully terminates, then the Activity is RUNNING 7

Activity lifecycle OnPause() Called when another activity comes to the foreground, or when someone presses back Commit unsaved changes to persistent data Stop cpu-consuming processes Make it fast 8

Activity lifecycle OnRestart() Similar to onCreate() We have an activity that was previously stopped 9

Activity lifecycle OnStop() Activity is no longer visible to the user Could be called because: the activity is about to be destroyed another activity comes to the foreground 10

Activity lifecycle OnDestroy() The activity is about to be destroyed Could happen because: The systems need some stack space Someone called finish() method on this activity Could check with isFinishing() 11