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
220
Android Programming 5
jibbo
1
160
Android Programming 4
jibbo
1
150
Android Overview
jibbo
1
180
Android Programming 3
jibbo
0
130
android programming 2
jibbo
0
150
Other Decks in Programming
See All in Programming
Jetpack Compose Mechanisms
skydoves
3
820
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
Domain-Driven Transformation
hschwentner
2
2.3k
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
660
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.6k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
210
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
The agentic SEO stack - context over prompts
schlessera
0
970
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Typedesign – Prime Four
hannesfritz
42
3.2k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
990
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
The browser strikes back
jonoalderson
0
1.8k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
エンジニアに許された特別な時間の終わり
watany
109
250k
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