Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
android programming 1
Search
Giovanni De Francesco
January 11, 2013
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
android programming 1
this slides explain how to use android's activity and views
Giovanni De Francesco
January 11, 2013
More Decks by Giovanni De Francesco
See All by Giovanni De Francesco
JSON explained
jibbo
2
230
Android Programming 5
jibbo
1
160
Android Programming 4
jibbo
1
160
Android Overview
jibbo
1
190
Android Programming 3
jibbo
0
140
android programming 2
jibbo
0
160
Other Decks in Programming
See All in Programming
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
340
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
1
150
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
JIS keyboard support in Omarchy
lef237
0
180
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.7k
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.4k
AI-Powered Domain-Driven Design
ziobrando
0
390
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
SODA - FACT BOOK(JP)
sodainc
1
40k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
5.1k
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
290
LLM 101
dalinaum
0
470
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
610
Six Lessons from altMBA
skipperchong
29
4.6k
30 Presentation Tips
portentint
PRO
1
460
The Invisible Side of Design
smashingmag
301
52k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
450
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
520
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.8k
Designing Powerful Visuals for Engaging Learning
tmiket
1
640
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
760
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