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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
190
AI 開発合宿を通して得た学び
niftycorp
PRO
0
160
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
1
170
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
480
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
720
へんな働き方
yusukebe
5
2.7k
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
220
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.2k
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.3k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.5k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
190
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
290
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
WENDY [Excerpt]
tessaabrams
9
37k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Evolving SEO for Evolving Search Engines
ryanjones
0
160
Agile that works and the tools we love
rasmusluckow
331
21k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
sira's awesome portfolio website redesign presentation
elsirapls
0
190
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.9k
How to Talk to Developers About Accessibility
jct
2
160
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
The browser strikes back
jonoalderson
0
810
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