Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
android programming 1
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Giovanni De Francesco
January 11, 2013
Programming
0
220
android programming 1
this slides explain how to use android's activity and views
Giovanni De Francesco
January 11, 2013
Tweet
Share
More Decks by Giovanni De Francesco
See All by Giovanni De Francesco
JSON explained
jibbo
2
220
Android Programming 5
jibbo
1
150
Android Programming 4
jibbo
1
140
Android Overview
jibbo
1
170
Android Programming 3
jibbo
0
130
android programming 2
jibbo
0
150
Other Decks in Programming
See All in Programming
Fluid Templating in TYPO3 14
s2b
0
130
Package Management Learnings from Homebrew
mikemcquaid
0
210
AI巻き込み型コードレビューのススメ
nealle
0
130
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
250
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
4
330
AgentCoreとHuman in the Loop
har1101
5
220
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
160
CSC307 Lecture 04
javiergs
PRO
0
660
Patterns of Patterns
denyspoltorak
0
1.4k
dchart: charts from deck markup
ajstarks
3
990
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
Architectural Extensions
denyspoltorak
0
280
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
Technical Leadership for Architectural Decision Making
baasie
1
240
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
The Curious Case for Waylosing
cassininazir
0
230
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
170
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
280
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The Invisible Side of Design
smashingmag
302
51k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
The SEO identity crisis: Don't let AI make you average
varn
0
64
YesSQL, Process and Tooling at Scale
rocio
174
15k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
Transcript
Android Programming MVC and Activities
Little taste of MVC Architectural pattern Controller Model View
Android Programming
What do you see here? Android Programming
First level: Activity A single, Task- focused, window. Android Programming
Activity Lifecycle More details on: developers.android.com Android Programming
What do you deeper see here? Android Programming
Second level: Views Every “brick” placed in your Activity. Examples
(javaàAndroid): JLabelàTextView JButtonàButton FlowLayoutàLinearLayout
Activity UI <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http:// schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"
> <TextView android:id="@+id/tv1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" /> </RelativeLayout> Android Programming
Activity Logic public class MainActivity extends Activity { @Override protected
void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); } } Android Programming
Referencing View TextView tv = (TextView) findViewById(R.id.tv1); Android Programming
Manifest File <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.firstapp” android:versionCode="1” android:versionName="1.0"
> <uses-sdk android:minSdkVersion=”7” android:targetSdkVersion="16" /> <application android:icon="@drawable/ic_launcher” android:label="@string/app_name”> <activity android:name="com.example.firstapp.MainActivity" 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> Android Programming
Working with Activities //first Activity Intent i = new Intent
(MainActivity.this, NewActivity.class); i.putExtra("key", "value"); //called Activity Intent launcher = getIntent(); launcher.getExtras().getString("key"); Android Programming
What should we do today? When the user clicks the
button another activity will start. The second activity shows username and password Android Programming
Credit: Groveshark images Activity lifecycle Android Programming