Submit Search
Upload
Build Android App Activity and Layout
•
0 likes
•
1,047 views
AI-enhanced title
Michael Pan
Follow
Android App Dev lesson serial - Activity
Read less
Read more
Education
Technology
News & Politics
Report
Share
Report
Share
1 of 34
Download now
Download to read offline
Recommended
Ch2 first app
Ch2 first app
Chia Wei Tsai
Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008
sullis
Invading the home screen
Invading the home screen
Matteo Bonifazi
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
Yusuke Takahashi, PhD
Mobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 Android
Mohammad Shaker
Ionic2 the the journey continues ng-sydney 02-03-16 and ionicaustralia 23-0...
Ionic2 the the journey continues ng-sydney 02-03-16 and ionicaustralia 23-0...
Sameera Gayan
Fragment me
Fragment me
a a
Building Drupal Apps for Distributions
Building Drupal Apps for Distributions
Phase2
Recommended
Ch2 first app
Ch2 first app
Chia Wei Tsai
Getting started with Google Android - OSCON 2008
Getting started with Google Android - OSCON 2008
sullis
Invading the home screen
Invading the home screen
Matteo Bonifazi
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
Yusuke Takahashi, PhD
Mobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 Android
Mohammad Shaker
Ionic2 the the journey continues ng-sydney 02-03-16 and ionicaustralia 23-0...
Ionic2 the the journey continues ng-sydney 02-03-16 and ionicaustralia 23-0...
Sameera Gayan
Fragment me
Fragment me
a a
Building Drupal Apps for Distributions
Building Drupal Apps for Distributions
Phase2
Android LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio button
priya Nithya
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-testing
hugs
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 Library
Taeho Kim
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in Android
Sittiphol Phanvilai
Spotify Apps
Spotify Apps
Lukasz Dynowski
Automating Hybrid Applications with Appium
Automating Hybrid Applications with Appium
Sauce Labs
Selendroid - Selenium for Android
Selendroid - Selenium for Android
Dominik Dary
Improving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce Labs
Isaac Murchie
Ionic creator
Ionic creator
Xavier Lozinguez
Android Workshop
Android Workshop
Junda Ong
Getting Started With Android Library Projects
Getting Started With Android Library Projects
gravityworksdd
I/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support Library
Sittiphol Phanvilai
Android Design Support Library
Android Design Support Library
Ibnu Sina Wardy
WordCamp Bucharest 2017
WordCamp Bucharest 2017
Alexandra Anghel
Android testing calabash
Android testing calabash
kellinreaver
#Fame case study
#Fame case study
Keshav Kashyap
Appium meet up noida
Appium meet up noida
Amit Rawat
안드로이드 세미나 2
안드로이드 세미나 2
ang0123dev
Max Milbers: VirtueMart, a free shop for free people
Max Milbers: VirtueMart, a free shop for free people
Kačka Kubová
More Related Content
What's hot
Android LAb - Creating an android app with Radio button
Android LAb - Creating an android app with Radio button
priya Nithya
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-testing
hugs
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 Library
Taeho Kim
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in Android
Sittiphol Phanvilai
Spotify Apps
Spotify Apps
Lukasz Dynowski
Automating Hybrid Applications with Appium
Automating Hybrid Applications with Appium
Sauce Labs
Selendroid - Selenium for Android
Selendroid - Selenium for Android
Dominik Dary
Improving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce Labs
Isaac Murchie
Ionic creator
Ionic creator
Xavier Lozinguez
Android Workshop
Android Workshop
Junda Ong
Getting Started With Android Library Projects
Getting Started With Android Library Projects
gravityworksdd
I/O Rewind 2015 : Android Design Support Library
I/O Rewind 2015 : Android Design Support Library
Sittiphol Phanvilai
Android Design Support Library
Android Design Support Library
Ibnu Sina Wardy
WordCamp Bucharest 2017
WordCamp Bucharest 2017
Alexandra Anghel
Android testing calabash
Android testing calabash
kellinreaver
#Fame case study
#Fame case study
Keshav Kashyap
Appium meet up noida
Appium meet up noida
Amit Rawat
What's hot
(20)
Android 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!
selenium-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.
モバイル検索とアプリ
モバイル検索とアプリ
Support Design Library
Support Design Library
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in Android
Spotify Apps
Spotify Apps
Automating Hybrid Applications with Appium
Automating Hybrid Applications with Appium
Selendroid - Selenium for Android
Selendroid - Selenium for Android
Improving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce Labs
Ionic creator
Ionic creator
Android Workshop
Android Workshop
Getting 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 Library
Android Design Support Library
Android Design Support Library
WordCamp Bucharest 2017
WordCamp Bucharest 2017
Android testing calabash
Android testing calabash
#Fame case study
#Fame case study
Appium meet up noida
Appium meet up noida
Viewers also liked
안드로이드 세미나 2
안드로이드 세미나 2
ang0123dev
Max Milbers: VirtueMart, a free shop for free people
Max Milbers: VirtueMart, a free shop for free people
Kačka Kubová
Android
Android
Keshan Sodimana
Scala on-android
Scala on-android
Max Lv
협업 툴 사용법
협업 툴 사용법
ang0123dev
Class Notes for Friday, September 24
Class Notes for Friday, September 24
Eric Olander
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_android
Denis Minja
Viewers also liked
(7)
안드로이드 세미나 2
안드로이드 세미나 2
Max Milbers: VirtueMart, a free shop for free people
Max Milbers: VirtueMart, a free shop for free people
Android
Android
Scala on-android
Scala on-android
협업 툴 사용법
협업 툴 사용법
Class Notes for Friday, September 24
Class Notes for Friday, September 24
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_android
Similar to Build Android App Activity and Layout
Share kmu itbz_20181106
Share kmu itbz_20181106
DongHyun Gang
Lecture #1 Creating your first android project
Lecture #1 Creating your first android project
Vitali Pekelis
Native Android Development Practices
Native Android Development Practices
Roy Clarkson
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Gustavo Fuentes Zurita
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Gustavo Fuentes Zurita
How to Setup App Indexation
How to Setup App Indexation
Justin Briggs
Android Life Cycle
Android Life Cycle
mssaman
Android in practice
Android in practice
Jose Manuel Ortega Candel
04 activities - Android
04 activities - Android
Wingston
An Introduction to Deep Linking and App Indexing Codelab
An Introduction to Deep Linking and App Indexing Codelab
Jarek Wilkiewicz
Fragments: Why, How, What For?
Fragments: Why, How, What For?
Brenda Cook
Android app development basics
Android app development basics
Anton Narusberg
Android Wear: A Developer's Perspective
Android Wear: A Developer's Perspective
Vin Lim
android level 3
android level 3
DevMix
Android Material Design APIs/Tips
Android Material Design APIs/Tips
Ken Yee
Creation of simple application using - step by step
Creation of simple application using - step by step
priya Nithya
Hierarchy viewer
Hierarchy viewer
Badrinath Kulkarni
Mini curso Android
Mini curso Android
Mario Jorge Pereira
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Skills Matter
4.preference management
4.preference management
maamir farooq
Similar to Build Android App Activity and Layout
(20)
Share kmu itbz_20181106
Share kmu itbz_20181106
Lecture #1 Creating your first android project
Lecture #1 Creating your first android project
Native Android Development Practices
Native Android Development Practices
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
How to Setup App Indexation
How to Setup App Indexation
Android Life Cycle
Android Life Cycle
Android in practice
Android in practice
04 activities - Android
04 activities - Android
An 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?
Android app development basics
Android app development basics
Android Wear: A Developer's Perspective
Android Wear: A Developer's Perspective
android level 3
android level 3
Android Material Design APIs/Tips
Android Material Design APIs/Tips
Creation of simple application using - step by step
Creation of simple application using - step by step
Hierarchy viewer
Hierarchy viewer
Mini curso Android
Mini curso Android
Droidcon: 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
More from Michael Pan
Shootting Game
Shootting Game
Michael Pan
Introduction to Android Studio
Introduction to Android Studio
Michael Pan
Eclipse and Genymotion
Eclipse and Genymotion
Michael Pan
Note something
Note something
Michael Pan
Strategy Pattern for Objective-C
Strategy Pattern for Objective-C
Michael Pan
Core data lightweight_migration
Core data lightweight_migration
Michael Pan
Google maps SDK for iOS 1.4
Google maps SDK for iOS 1.4
Michael Pan
Homework2 play cards
Homework2 play cards
Michael Pan
Autorelease pool
Autorelease pool
Michael Pan
Objc under the_hood_2013
Objc under the_hood_2013
Michael Pan
Prototype by Xcode
Prototype by Xcode
Michael Pan
Dropbox sync
Dropbox sync
Michael Pan
Nimbus
Nimbus
Michael Pan
Superstar dj pdf
Superstar dj pdf
Michael Pan
ADB - Arthur
ADB - Arthur
Michael Pan
比價撿便宜 Steven
比價撿便宜 Steven
Michael Pan
Appsgaga - iOS Game Developer
Appsgaga - iOS Game Developer
Michael Pan
GZFox Inc. Jacky
GZFox Inc. Jacky
Michael Pan
創投公司 hoku_20121017
創投公司 hoku_20121017
Michael Pan
Opening iOS App 開發者交流會
Opening iOS App 開發者交流會
Michael Pan
More from Michael Pan
(20)
Shootting Game
Shootting Game
Introduction to Android Studio
Introduction to Android Studio
Eclipse and Genymotion
Eclipse and Genymotion
Note something
Note something
Strategy Pattern for Objective-C
Strategy Pattern for Objective-C
Core data lightweight_migration
Core data lightweight_migration
Google maps SDK for iOS 1.4
Google maps SDK for iOS 1.4
Homework2 play cards
Homework2 play cards
Autorelease pool
Autorelease pool
Objc under the_hood_2013
Objc under the_hood_2013
Prototype by Xcode
Prototype by Xcode
Dropbox sync
Dropbox sync
Nimbus
Nimbus
Superstar dj pdf
Superstar dj pdf
ADB - Arthur
ADB - Arthur
比價撿便宜 Steven
比價撿便宜 Steven
Appsgaga - iOS Game Developer
Appsgaga - iOS Game Developer
GZFox Inc. Jacky
GZFox Inc. Jacky
創投公司 hoku_20121017
創投公司 hoku_20121017
Opening iOS App 開發者交流會
Opening iOS App 開發者交流會
Recently uploaded
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
Rosabel UA
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
lancelewisportillo
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
Rommel Regala
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
TechSoup
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
Anupkumar Sharma
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
BP KOIRALA INSTITUTE OF HELATH SCIENCS,, NEPAL
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
Conquiztadors- the Quiz Society of Sri Venkateswara College
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
JojoEDelaCruz
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
JOYLYNSAMANIEGO
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
MIPLM
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
JanEmmanBrigoli
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
Conquiztadors- the Quiz Society of Sri Venkateswara College
Expanded definition: technical and operational
Expanded definition: technical and operational
ssuser3e220a
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
BabyAnnMotar
Visit to a blind student's school🧑🦯🧑🦯(community medicine)
Visit to a blind student's school🧑🦯🧑🦯(community medicine)
lakshayb543
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
Nguyen Thanh Tu Collection
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
Seán Kennedy
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
Humphrey A Beña
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
VanesaIglesias10
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
JoshuaGantuangco2
Recently uploaded
(20)
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
Expanded definition: technical and operational
Expanded definition: technical and operational
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
Visit to a blind student's school🧑🦯🧑🦯(community medicine)
Visit to a blind student's school🧑🦯🧑🦯(community medicine)
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
Build Android App Activity and Layout
1.
Activity Michael Pan
2.
The project
3.
Blank Activity
4.
Layout - activity_record.xml
5.
Project View
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
9.
Run - Change
Icon
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
15.
Run @string/main_activity_label
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
18.
Add some Control EditText Button
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
23.
layout xml in
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
28.
import class option +
Enter
29.
EditText & Button
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
32.
OnClickListener
33.
View.OnClickListener new View.OnClickListener() {! !
@Override! ! public void onClick(View v) {! ! ! mTopTextView.setText(mInputView.getText());! ! }! }
34.
Question
Download now