Lecture 4 agenda Event Handling Fragments The Freemason Conspiracy

Slides:



Advertisements
Similar presentations
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
Advertisements

Unlocking Android Chapter 4.  Understanding activities and views  Exploring the Activity lifecycle  Working with resources  Defining the AndroidManifest.xml.
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.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
Android and Project Structure. Android Android OS – Built on Linux Kernel – Phones – Netbooks – Readers – Other???
Mobile Programming Pertemuan 6 Presented by Mulyono Poltek NSC Surabaya.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Android Programming. Outline Preparation Create new project Build and Run a project Debug a project Deploy on devices.
Chien-Chung Shen Manifest and Activity Chien-Chung Shen
Intro to Android Programming George Nychis Srinivasan Seshan.
Lecture 3 agenda Layouts Intents (both explicit and implicit) ListViews and Adapters.
Chapter 3 Navigating a Project Goals & Objectives 1.Get familiar with the navigation of the project. How is everything structured? What settings can you.
CS5103 Software Engineering Lecture 08 Android Development II.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
CS378 - Mobile Computing Intents.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Lecture 3 agenda revised setup Android Studio alt-views & shortcuts review layouts and resources debugging in Android Studio lifecycle in Android lab chapters.
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
Lecture 2 agenda Setting-up projects properly Review git config Java event model Anatomy of and Android Application Activity Lifecycle State Changes; saving.
Overview of Android Application Development
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Configuring Android Development Environment Nilesh Singh.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Lec 03 Intents Explicit Intents Implicit Intents.
Working with Multiple Activities. Slide 2 Introduction Working with multiple activities Creating multiple views Introduction to intents Passing data to.
Lec 04 Intents and Bundles Fragments. Activated by Intents Activities Services Broadcast Receivers (aka Receivers) (
1 Android Introduction Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Building User Interfaces Basic Applications
Intoduction to Andriod studio Environment With a hello world program.
Resources & Android Manifest Калин Кадиев Astea Solutions AD.
Introduction to Android OS Димитър Н. Димитров Astea Solutions AD.
CHAPTER 4 Fragments ActionBar Menus. Explore how to build applications that use an ActionBar and Fragments Understand the Fragment lifecycle Learn to.
Intro To Android Programming
Mobile Device Development
Chapter 2: Simplify! The Android User Interface
Mobile Device Development
Mobile Applications (Android Programming)
Android Mobile Application Development
Android 01: Fundamentals
Tutorial 2 Programming Editors Recommendation & Cordova Plugin Installation and Management Li Xu Department of Systems Engineering.
Reactive Android Development
Android Runtime – Dalvik VM
Lecture 3 agenda A tour of Android studio features
Android Studio, Android System Basics and Git
Mobile Application Development BSCS-7 Lecture # 6
Software Tools and Environments
MAD.
Activities and Intents
Anatomy of an Android App and the App Lifecycle
Android Mobile Application Development
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
The Android Activity Lifecycle
CA16R405 - Mobile Application Development (Theory)
Anatomy of an Android Application
CS323 Android Getting Started
CIS 470 Mobile App Development
CS5103 Software Engineering
Building User Interfaces Basic Applications
Android Developer Fundamentals V2 Lesson 1
CIS 470 Mobile App Development
Activities and Intents
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
Getting Started with Android…
Introduction to Android
Android Development Introduction to Android Development 2011/01/16
CIS 694/EEC 693 Android Sensor Programming
Presentation transcript:

Lecture 4 agenda Event Handling Fragments The Freemason Conspiracy Scenes and Animations ListViews and Adapters More Reminders From the book: 20, 24-27, 28-30 1

Serializable versus Parcelable Parcelable is an Interface very much like Serializable only it has been optimized for Android. Unlike Serializeable, all the reflection meta-data has been stripped-out of the parcelized object.  

Intents Intent messaging is a facility for late run-time binding between components in the same or different applications.  Intents are handled by the Android OS. In order for the OS to know about a component, it must be declared in the application manifest file. If a component does not define Intent filters, it can only be called by explicit Intents. A component with filters can receive both explicit and implicit intents. 6/12/12

AndroidManifest.xml file Is an inventory of all the components in an application. If the component is not listed there, the Android OS won't know it's there. Not even intra-app component communication will resolve. 6/12/12

Android OS I AndroidManifest.xml AndroidManifest.xml *A A A *A Activies, Receivers, Services, and Content-Providers all must be declared in the manifest. Intnets are calls to the op-system. It handles all intents, explicit and implicit.

ListViews and Adapters http://developer.android.com/guide/topics/resources/providing-resources.html 6

Adapters 7

AdapterViews 8

FreeMasons were a very powerful guild of stone masons FreeMasons were a very powerful guild of stone masons. The reason they call them FreeMasons is because their skills were so valuable in the middle ages that they were not subject to any soveriegn King. They were free to travel wherever they need cathedrals built. They had the equivalent of an H1B-Visa, but even more powerful.

Trace their craft back to the architect of solomons' temple Trace their craft back to the architect of solomons' temple. A guy named Hyrim Abiff.

The thing about building with stone is that it's a very heavy material and therefore forces you to build in a particular way. This is rockafeller chapel and you will notice that aside from an occassional gargoyle, this structure is get's lighter as you rise in elevation and the pieces get smaller. If it were the other-way around, the building would collapse. If you're a stone-mason, you mus build in blocks and pyramids.

When new materials such as iron beams and rebar reinforced concrete came on the scene, the FreeMasons were horrified and they put a curse on all the engineering disciplines, that said, you can only build with blocks and pyramids.

These kind of cantilevered structures scared them the most because clearly this would put an end to their stone mason craft.

The freemasons were a powerful bunch The freemasons were a powerful bunch. A lot of the founding fathers were freemasons. They could get away with this. Fortunately, all the other engienering disciplines recovered from this hex, except for computer science, and therefore we are condemned to build in blocks and pyramids forever.

He approves. So he clearly approves of this lovely pyramid here.

Resources in Android http://developer.android.com/guide/topics/resources/providing-resources.html 18

Layouts and resources Code: Java (or C if you use NDK) Metafiles: AndroidManifest, project.properties, .gitignore. These all describe the project. Resources “anything in android that is not code or metafiles” Activities have one or more layouts, and all Layouts have a root-ViewGroup. This root-ViewGroup is the container for the Views. R.java (gen directory) is a bridge between your resources and your code. If you want to interact programmatically with a resource, it must have an id.

Inspecting layouts and resources You can view both xml and design mode in AS. You can see how it would look on multiple devices || preview all screens, and toggle with remove previews.

Layouts and resources res directories can have suffixes, such as layout-land, or drawable-hdpi, values-es, etc. These suffixes allow you to differentiate at RUNTIME depending on the settings, hardware, and configuration of the device. For example, if your device is in landscape mode, it'll try to fetch the layout from layout-land first, then it will try to fetch the layout from layout. Vice versa as well; if it's in portait mode, it'll try for layout-port, then layout. shown in preview mode of resource and rotate device

Lifecycle in Android http://developer.android.com/guide/topics/resources/providing-resources.html 24

how to copy files from a bc branch to a lb branch Actions || Open in Terminal git checkout c7c7 res/drawable-*/. git checkout c7c7 res/values/str* before a commit you may remove from stage, then: discard: for existing files that you want to roll back remove: for new files that you want to delete

ADB (Android Device Bridge) adb kill-server adb start-server adb get-state adb devices Use kill-server / start-server to reboot the adb if your device/emulator is not communicating with your dev-machine.

Navigating in Android Studio alt-1 is project view (alt-F1 is show it in project view) alt-2 is favorites (including bookmarks and breakpoints) alt-3 is the search view (cntl-shift-F to find) alt-4 run-console alt-5 is debug alt-6 is android view (ddms, logcat) alt-7 is structure view (see members and methods) alt-9 is changes(VCS) view Look at the margin of your project

Get help cntl-shift-A (find anything in Android studio) Searching (on mac, replace cntrl with command) cntl-F (find something in the local file) cntl-shift-F (find something in the project) Go to file in code (on mac, replace cntrl with command) cntl-N (go to files typically in src) cntl-shift-n (go to any file, including res) cntl-E (open recent files) Go to file in project alt-F1

Go to definition cntl-B (go directly to the method definition) Javadocs cntl-Q (open the javadocs) Live Templates cntl-J adding your own Live Templates (cntl-shift-A “live template”)

Debugging Using the debugger (alt-5) See bookmarks and breakpoints (alt-2) F11 to toggle bookmark Using logcat (alt-6) Using lint and AS analyzer: Analyze || Inspect Code ///TODO this is my todo message