SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Activity
Michael Pan
The project
Blank Activity
Layout - activity_record.xml
Project View
AndroidManifest.xml
DailyRecord > app > src > main > AndroidManifest.xml
Application attributes
<?xml version="1.0" encoding="utf-8"?>!
<manifest xmlns:android="http://schemas.android.com/apk/res/android"!
package="com.zencher.dailyrecord.app" >!
!
<application!
android:allowBackup="true" !
android:icon="@drawable/ic_launcher"!
android:label="@string/app_name"!
android:theme="@style/AppTheme" >!
<activity!
android:name="com.zencher.dailyrecord.app.RecordActivity"!
android:label="@string/app_name" >!
<intent-filter>!
<action android:name="android.intent.action.MAIN" />!
!
<category android:name="android.intent.category.LAUNCHER" />!
</intent-filter>!
</activity>!
</application>!
!
</manifest>
http://bit.ly/1msJ804
Backup App
image
Change icon
@drawable/ic_launcher
app > src > main > res > drawable-xxxx
Run - Change Icon
Application attributes - android:label
<?xml version="1.0" encoding="utf-8"?>!
<manifest xmlns:android="http://schemas.android.com/apk/res/android"!
package="com.zencher.dailyrecord.app" >!
!
<application!
android:allowBackup="true" !
android:icon="@drawable/ic_launcher"!
android:label="@string/app_name"!
android:theme="@style/AppTheme" >!
<activity!
android:name="com.zencher.dailyrecord.app.RecordActivity"!
android:label="@string/app_name" >!
<intent-filter>!
<action android:name="android.intent.action.MAIN" />!
!
<category android:name="android.intent.category.LAUNCHER" />!
</intent-filter>!
</activity>!
</application>!
!
</manifest>
Another resource
@string/app_name
app > src > main > res > values > strings.xml
Tag - activity
<?xml version="1.0" encoding="utf-8"?>!
<manifest xmlns:android="http://schemas.android.com/apk/res/android"!
package="com.zencher.dailyrecord.app" >!
!
<application!
android:allowBackup="true" !
android:icon="@drawable/ic_launcher"!
android:label="@string/app_name"!
android:theme="@style/AppTheme" >!
<activity!
android:name="com.zencher.dailyrecord.app.RecordActivity"!
android:label="@string/app_name" >!
<intent-filter>!
<action android:name="android.intent.action.MAIN" />!
!
<category android:name="android.intent.category.LAUNCHER" />!
</intent-filter>!
</activity>!
</application>!
!
</manifest>
Class name
activity - android:label
<?xml version="1.0" encoding="utf-8"?>!
<manifest xmlns:android="http://schemas.android.com/apk/res/android"!
package="com.zencher.dailyrecord.app" >!
!
<application!
android:allowBackup="true" !
android:icon="@drawable/ic_launcher"!
android:label="@string/app_name"!
android:theme="@style/AppTheme" >!
<activity!
android:name="com.zencher.dailyrecord.app.RecordActivity"!
android:label="@string/app_name" >!
<intent-filter>!
<action android:name="android.intent.action.MAIN" />!
!
<category android:name="android.intent.category.LAUNCHER" />!
</intent-filter>!
</activity>!
</application>!
!
</manifest>
Create a new string tag
Run
@string/main_activity_label
intent-filter
<?xml version="1.0" encoding="utf-8"?>!
<manifest xmlns:android="http://schemas.android.com/apk/res/android"!
package="com.zencher.dailyrecord.app" >!
!
<application!
android:allowBackup="true" !
android:icon="@drawable/ic_launcher"!
android:label="@string/app_name"!
android:theme="@style/AppTheme" >!
<activity!
android:name="com.zencher.dailyrecord.app.RecordActivity"!
android:label="@string/app_name" >!
<intent-filter>!
<action android:name="android.intent.action.MAIN" />!
!
<category android:name="android.intent.category.LAUNCHER" />!
</intent-filter>!
</activity>!
</application>!
!
</manifest>
intent
Message among activities
intent-filter
filter intent event
must have a action
android.intent.action.MAIN - the initial activity
category
android.intent.category.LAUNCHER - Should be displayed in the
top-level launcher
Add some Control
EditText
Button
activity_record.xml in layout
app > src > main > res > layout > activity_record.xml
<RelativeLayout >!
!
<TextView />!
!
<EditText />!
!
<Button />!
!
</RelativeLayout>
Design & Text - layout xml
Design Text
RecordActivity.java
app > src > main > java > (domain) > RecordActivity.java
public class RecordActivity extends Activity {!
!
@Override!
protected void onCreate(Bundle savedInstanceState) {!
super.onCreate(savedInstanceState);!
setContentView(R.layout.activity_record);!
} !
! ! // ignored… !
}
R
Auto generated Class
files in res/ will be the field in R
app > build > source > r > debug > (domain) > R
layout xml in R
Compiling process
res/ AndroidManifest.xml R.java
Asset
Packaging Tool
(aapt)
src/
RecordActivity.java
Compile Java
Java bytecode
.classCross Compile
to Dalvik
Dalvik bytecode
.dex
Compiled
Resource
Build & Sign
apk
Android Package
.apk
Install &
Run
setContentView(R.layout.activity_record);
<RelativeLayout >!
!
<TextView />!
!
<EditText />!
!
<Button />!
!
</RelativeLayout>
ClassLoader.loadClass(“RelativeLayout”) RelativeLayout
ClassLoader.loadClass(“TextView”) TextView
EditText
Button
ClassLoader.loadClass(“EditText”)
ClassLoader.loadClass(“Button”)
Run
Get instance into variable
import class
option + Enter
EditText & Button
Get instance in Activity
findViewById()
protected void onCreate(Bundle savedInstanceState) {!
super.onCreate(savedInstanceState);!
setContentView(R.layout.activity_record);!
mTopTextView = (TextView) findViewById(R.id.textView);!
}
activity_record.xml
Apply into three variables
OnClickListener
View.OnClickListener
new View.OnClickListener() {!
! @Override!
! public void onClick(View v) {!
! ! mTopTextView.setText(mInputView.getText());!
! }!
}
Question

Weitere ähnliche Inhalte

Was ist angesagt?

Android LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio buttonAndroid LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio buttonpriya Nithya
 
O sucesso do seu app está nos detalhes!
O sucesso do seu app está nos detalhes!O sucesso do seu app está nos detalhes!
O sucesso do seu app está nos detalhes!Suelen Carvalho
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testinghugs
 
Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Matheus Cardoso
 
モバイル検索とアプリ
モバイル検索とアプリモバイル検索とアプリ
モバイル検索とアプリKenichi Suzuki
 
Support Design Library
Support Design LibrarySupport Design Library
Support Design LibraryTaeho Kim
 
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidI/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidSittiphol Phanvilai
 
Automating Hybrid Applications with Appium
Automating Hybrid Applications with AppiumAutomating Hybrid Applications with Appium
Automating Hybrid Applications with AppiumSauce Labs
 
Selendroid - Selenium for Android
Selendroid - Selenium for AndroidSelendroid - Selenium for Android
Selendroid - Selenium for AndroidDominik Dary
 
Improving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce LabsImproving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce LabsIsaac Murchie
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
Getting Started With Android Library Projects
Getting Started With Android Library ProjectsGetting Started With Android Library Projects
Getting Started With Android Library Projectsgravityworksdd
 
I/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support LibraryI/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support LibrarySittiphol Phanvilai
 
Android Design Support Library
Android Design Support LibraryAndroid Design Support Library
Android Design Support LibraryIbnu Sina Wardy
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabashkellinreaver
 
Appium meet up noida
Appium meet up noidaAppium meet up noida
Appium meet up noidaAmit Rawat
 

Was ist angesagt? (20)

Android LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio buttonAndroid LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio button
 
O sucesso do seu app está nos detalhes!
O sucesso do seu app está nos detalhes!O sucesso do seu app está nos detalhes!
O sucesso do seu app está nos detalhes!
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testing
 
Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.
 
モバイル検索とアプリ
モバイル検索とアプリモバイル検索とアプリ
モバイル検索とアプリ
 
Support Design Library
Support Design LibrarySupport Design Library
Support Design Library
 
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidI/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in Android
 
Spotify Apps
Spotify AppsSpotify Apps
Spotify Apps
 
Automating Hybrid Applications with Appium
Automating Hybrid Applications with AppiumAutomating Hybrid Applications with Appium
Automating Hybrid Applications with Appium
 
Selendroid - Selenium for Android
Selendroid - Selenium for AndroidSelendroid - Selenium for Android
Selendroid - Selenium for Android
 
Improving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce LabsImproving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce Labs
 
Ionic creator
Ionic creatorIonic creator
Ionic creator
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Getting Started With Android Library Projects
Getting Started With Android Library ProjectsGetting Started With Android Library Projects
Getting Started With Android Library Projects
 
I/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support LibraryI/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support Library
 
Android Design Support Library
Android Design Support LibraryAndroid Design Support Library
Android Design Support Library
 
WordCamp Bucharest 2017
WordCamp Bucharest 2017WordCamp Bucharest 2017
WordCamp Bucharest 2017
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabash
 
#Fame case study
#Fame case study#Fame case study
#Fame case study
 
Appium meet up noida
Appium meet up noidaAppium meet up noida
Appium meet up noida
 

Andere mochten auch

안드로이드 세미나 2
안드로이드 세미나 2안드로이드 세미나 2
안드로이드 세미나 2ang0123dev
 
Max Milbers: VirtueMart, a free shop for free people
Max Milbers: VirtueMart, a free shop for free peopleMax Milbers: VirtueMart, a free shop for free people
Max Milbers: VirtueMart, a free shop for free peopleKačka Kubová
 
Scala on-android
Scala on-androidScala on-android
Scala on-androidMax Lv
 
협업 툴 사용법
협업 툴 사용법협업 툴 사용법
협업 툴 사용법ang0123dev
 
Class Notes for Friday, September 24
Class Notes for Friday, September 24Class Notes for Friday, September 24
Class Notes for Friday, September 24Eric Olander
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidDenis Minja
 

Andere mochten auch (7)

안드로이드 세미나 2
안드로이드 세미나 2안드로이드 세미나 2
안드로이드 세미나 2
 
Max Milbers: VirtueMart, a free shop for free people
Max Milbers: VirtueMart, a free shop for free peopleMax Milbers: VirtueMart, a free shop for free people
Max Milbers: VirtueMart, a free shop for free people
 
Android
AndroidAndroid
Android
 
Scala on-android
Scala on-androidScala on-android
Scala on-android
 
협업 툴 사용법
협업 툴 사용법협업 툴 사용법
협업 툴 사용법
 
Class Notes for Friday, September 24
Class Notes for Friday, September 24Class Notes for Friday, September 24
Class Notes for Friday, September 24
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_android
 

Ähnlich wie Activity

Share kmu itbz_20181106
Share kmu itbz_20181106Share kmu itbz_20181106
Share kmu itbz_20181106DongHyun Gang
 
Lecture #1 Creating your first android project
Lecture #1  Creating your first android projectLecture #1  Creating your first android project
Lecture #1 Creating your first android projectVitali Pekelis
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development PracticesRoy Clarkson
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Gustavo Fuentes Zurita
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Gustavo Fuentes Zurita
 
How to Setup App Indexation
How to Setup App IndexationHow to Setup App Indexation
How to Setup App IndexationJustin Briggs
 
Android Life Cycle
Android Life CycleAndroid Life Cycle
Android Life Cyclemssaman
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - AndroidWingston
 
An Introduction to Deep Linking and App Indexing Codelab
An Introduction to Deep Linking and App Indexing CodelabAn Introduction to Deep Linking and App Indexing Codelab
An Introduction to Deep Linking and App Indexing CodelabJarek Wilkiewicz
 
Fragments: Why, How, What For?
Fragments: Why, How, What For?Fragments: Why, How, What For?
Fragments: Why, How, What For?Brenda Cook
 
Android app development basics
Android app development basicsAndroid app development basics
Android app development basicsAnton Narusberg
 
Android Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveAndroid Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveVin Lim
 
android level 3
android level 3android level 3
android level 3DevMix
 
Android Material Design APIs/Tips
Android Material Design APIs/TipsAndroid Material Design APIs/Tips
Android Material Design APIs/TipsKen Yee
 
Creation of simple application using - step by step
Creation of simple application using - step by stepCreation of simple application using - step by step
Creation of simple application using - step by steppriya Nithya
 
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010Skills Matter
 
4.preference management
4.preference management 4.preference management
4.preference management maamir farooq
 

Ähnlich wie Activity (20)

Share kmu itbz_20181106
Share kmu itbz_20181106Share kmu itbz_20181106
Share kmu itbz_20181106
 
Lecture #1 Creating your first android project
Lecture #1  Creating your first android projectLecture #1  Creating your first android project
Lecture #1 Creating your first android project
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
 
How to Setup App Indexation
How to Setup App IndexationHow to Setup App Indexation
How to Setup App Indexation
 
Android Life Cycle
Android Life CycleAndroid Life Cycle
Android Life Cycle
 
Android in practice
Android in practiceAndroid in practice
Android in practice
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - Android
 
An Introduction to Deep Linking and App Indexing Codelab
An Introduction to Deep Linking and App Indexing CodelabAn Introduction to Deep Linking and App Indexing Codelab
An Introduction to Deep Linking and App Indexing Codelab
 
Fragments: Why, How, What For?
Fragments: Why, How, What For?Fragments: Why, How, What For?
Fragments: Why, How, What For?
 
Android app development basics
Android app development basicsAndroid app development basics
Android app development basics
 
Android Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveAndroid Wear: A Developer's Perspective
Android Wear: A Developer's Perspective
 
android level 3
android level 3android level 3
android level 3
 
Android Material Design APIs/Tips
Android Material Design APIs/TipsAndroid Material Design APIs/Tips
Android Material Design APIs/Tips
 
Creation of simple application using - step by step
Creation of simple application using - step by stepCreation of simple application using - step by step
Creation of simple application using - step by step
 
Hierarchy viewer
Hierarchy viewerHierarchy viewer
Hierarchy viewer
 
Mini curso Android
Mini curso AndroidMini curso Android
Mini curso Android
 
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
 
4.preference management
4.preference management 4.preference management
4.preference management
 

Mehr von Michael Pan

Introduction to Android Studio
Introduction to Android StudioIntroduction to Android Studio
Introduction to Android StudioMichael Pan
 
Eclipse and Genymotion
Eclipse and GenymotionEclipse and Genymotion
Eclipse and GenymotionMichael Pan
 
Strategy Pattern for Objective-C
Strategy Pattern for Objective-CStrategy Pattern for Objective-C
Strategy Pattern for Objective-CMichael Pan
 
Core data lightweight_migration
Core data lightweight_migrationCore data lightweight_migration
Core data lightweight_migrationMichael Pan
 
Google maps SDK for iOS 1.4
Google maps SDK for iOS 1.4Google maps SDK for iOS 1.4
Google maps SDK for iOS 1.4Michael Pan
 
Homework2 play cards
Homework2 play cardsHomework2 play cards
Homework2 play cardsMichael Pan
 
Autorelease pool
Autorelease poolAutorelease pool
Autorelease poolMichael Pan
 
Objc under the_hood_2013
Objc under the_hood_2013Objc under the_hood_2013
Objc under the_hood_2013Michael Pan
 
Prototype by Xcode
Prototype by XcodePrototype by Xcode
Prototype by XcodeMichael Pan
 
Superstar dj pdf
Superstar dj pdfSuperstar dj pdf
Superstar dj pdfMichael Pan
 
比價撿便宜 Steven
比價撿便宜 Steven比價撿便宜 Steven
比價撿便宜 StevenMichael Pan
 
Appsgaga - iOS Game Developer
Appsgaga - iOS Game DeveloperAppsgaga - iOS Game Developer
Appsgaga - iOS Game DeveloperMichael Pan
 
GZFox Inc. Jacky
GZFox Inc. JackyGZFox Inc. Jacky
GZFox Inc. JackyMichael Pan
 
創投公司 hoku_20121017
創投公司 hoku_20121017創投公司 hoku_20121017
創投公司 hoku_20121017Michael Pan
 
Opening iOS App 開發者交流會
Opening iOS App 開發者交流會Opening iOS App 開發者交流會
Opening iOS App 開發者交流會Michael Pan
 

Mehr von Michael Pan (20)

Shootting Game
Shootting GameShootting Game
Shootting Game
 
Introduction to Android Studio
Introduction to Android StudioIntroduction to Android Studio
Introduction to Android Studio
 
Eclipse and Genymotion
Eclipse and GenymotionEclipse and Genymotion
Eclipse and Genymotion
 
Note something
Note somethingNote something
Note something
 
Strategy Pattern for Objective-C
Strategy Pattern for Objective-CStrategy Pattern for Objective-C
Strategy Pattern for Objective-C
 
Core data lightweight_migration
Core data lightweight_migrationCore data lightweight_migration
Core data lightweight_migration
 
Google maps SDK for iOS 1.4
Google maps SDK for iOS 1.4Google maps SDK for iOS 1.4
Google maps SDK for iOS 1.4
 
Homework2 play cards
Homework2 play cardsHomework2 play cards
Homework2 play cards
 
Autorelease pool
Autorelease poolAutorelease pool
Autorelease pool
 
Objc under the_hood_2013
Objc under the_hood_2013Objc under the_hood_2013
Objc under the_hood_2013
 
Prototype by Xcode
Prototype by XcodePrototype by Xcode
Prototype by Xcode
 
Dropbox sync
Dropbox syncDropbox sync
Dropbox sync
 
Nimbus
NimbusNimbus
Nimbus
 
Superstar dj pdf
Superstar dj pdfSuperstar dj pdf
Superstar dj pdf
 
ADB - Arthur
ADB - ArthurADB - Arthur
ADB - Arthur
 
比價撿便宜 Steven
比價撿便宜 Steven比價撿便宜 Steven
比價撿便宜 Steven
 
Appsgaga - iOS Game Developer
Appsgaga - iOS Game DeveloperAppsgaga - iOS Game Developer
Appsgaga - iOS Game Developer
 
GZFox Inc. Jacky
GZFox Inc. JackyGZFox Inc. Jacky
GZFox Inc. Jacky
 
創投公司 hoku_20121017
創投公司 hoku_20121017創投公司 hoku_20121017
創投公司 hoku_20121017
 
Opening iOS App 開發者交流會
Opening iOS App 開發者交流會Opening iOS App 開發者交流會
Opening iOS App 開發者交流會
 

Kürzlich hochgeladen

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Kürzlich hochgeladen (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Activity

  • 6. AndroidManifest.xml DailyRecord > app > src > main > AndroidManifest.xml
  • 7. Application attributes <?xml version="1.0" encoding="utf-8"?>! <manifest xmlns:android="http://schemas.android.com/apk/res/android"! package="com.zencher.dailyrecord.app" >! ! <application! android:allowBackup="true" ! android:icon="@drawable/ic_launcher"! android:label="@string/app_name"! android:theme="@style/AppTheme" >! <activity! android:name="com.zencher.dailyrecord.app.RecordActivity"! android:label="@string/app_name" >! <intent-filter>! <action android:name="android.intent.action.MAIN" />! ! <category android:name="android.intent.category.LAUNCHER" />! </intent-filter>! </activity>! </application>! ! </manifest> http://bit.ly/1msJ804 Backup App image
  • 8. Change icon @drawable/ic_launcher app > src > main > res > drawable-xxxx
  • 10. Application attributes - android:label <?xml version="1.0" encoding="utf-8"?>! <manifest xmlns:android="http://schemas.android.com/apk/res/android"! package="com.zencher.dailyrecord.app" >! ! <application! android:allowBackup="true" ! android:icon="@drawable/ic_launcher"! android:label="@string/app_name"! android:theme="@style/AppTheme" >! <activity! android:name="com.zencher.dailyrecord.app.RecordActivity"! android:label="@string/app_name" >! <intent-filter>! <action android:name="android.intent.action.MAIN" />! ! <category android:name="android.intent.category.LAUNCHER" />! </intent-filter>! </activity>! </application>! ! </manifest>
  • 11. Another resource @string/app_name app > src > main > res > values > strings.xml
  • 12. Tag - activity <?xml version="1.0" encoding="utf-8"?>! <manifest xmlns:android="http://schemas.android.com/apk/res/android"! package="com.zencher.dailyrecord.app" >! ! <application! android:allowBackup="true" ! android:icon="@drawable/ic_launcher"! android:label="@string/app_name"! android:theme="@style/AppTheme" >! <activity! android:name="com.zencher.dailyrecord.app.RecordActivity"! android:label="@string/app_name" >! <intent-filter>! <action android:name="android.intent.action.MAIN" />! ! <category android:name="android.intent.category.LAUNCHER" />! </intent-filter>! </activity>! </application>! ! </manifest> Class name
  • 13. activity - android:label <?xml version="1.0" encoding="utf-8"?>! <manifest xmlns:android="http://schemas.android.com/apk/res/android"! package="com.zencher.dailyrecord.app" >! ! <application! android:allowBackup="true" ! android:icon="@drawable/ic_launcher"! android:label="@string/app_name"! android:theme="@style/AppTheme" >! <activity! android:name="com.zencher.dailyrecord.app.RecordActivity"! android:label="@string/app_name" >! <intent-filter>! <action android:name="android.intent.action.MAIN" />! ! <category android:name="android.intent.category.LAUNCHER" />! </intent-filter>! </activity>! </application>! ! </manifest>
  • 14. Create a new string tag
  • 16. intent-filter <?xml version="1.0" encoding="utf-8"?>! <manifest xmlns:android="http://schemas.android.com/apk/res/android"! package="com.zencher.dailyrecord.app" >! ! <application! android:allowBackup="true" ! android:icon="@drawable/ic_launcher"! android:label="@string/app_name"! android:theme="@style/AppTheme" >! <activity! android:name="com.zencher.dailyrecord.app.RecordActivity"! android:label="@string/app_name" >! <intent-filter>! <action android:name="android.intent.action.MAIN" />! ! <category android:name="android.intent.category.LAUNCHER" />! </intent-filter>! </activity>! </application>! ! </manifest>
  • 17. intent Message among activities intent-filter filter intent event must have a action android.intent.action.MAIN - the initial activity category android.intent.category.LAUNCHER - Should be displayed in the top-level launcher
  • 19. activity_record.xml in layout app > src > main > res > layout > activity_record.xml <RelativeLayout >! ! <TextView />! ! <EditText />! ! <Button />! ! </RelativeLayout>
  • 20. Design & Text - layout xml Design Text
  • 21. RecordActivity.java app > src > main > java > (domain) > RecordActivity.java public class RecordActivity extends Activity {! ! @Override! protected void onCreate(Bundle savedInstanceState) {! super.onCreate(savedInstanceState);! setContentView(R.layout.activity_record);! } ! ! ! // ignored… ! }
  • 22. R Auto generated Class files in res/ will be the field in R app > build > source > r > debug > (domain) > R
  • 24. Compiling process res/ AndroidManifest.xml R.java Asset Packaging Tool (aapt) src/ RecordActivity.java Compile Java Java bytecode .classCross Compile to Dalvik Dalvik bytecode .dex Compiled Resource Build & Sign apk Android Package .apk Install & Run
  • 25. setContentView(R.layout.activity_record); <RelativeLayout >! ! <TextView />! ! <EditText />! ! <Button />! ! </RelativeLayout> ClassLoader.loadClass(“RelativeLayout”) RelativeLayout ClassLoader.loadClass(“TextView”) TextView EditText Button ClassLoader.loadClass(“EditText”) ClassLoader.loadClass(“Button”)
  • 26. Run
  • 27. Get instance into variable
  • 30. Get instance in Activity findViewById() protected void onCreate(Bundle savedInstanceState) {! super.onCreate(savedInstanceState);! setContentView(R.layout.activity_record);! mTopTextView = (TextView) findViewById(R.id.textView);! } activity_record.xml
  • 31. Apply into three variables
  • 33. View.OnClickListener new View.OnClickListener() {! ! @Override! ! public void onClick(View v) {! ! ! mTopTextView.setText(mInputView.getText());! ! }! }