Escolar Documentos
Profissional Documentos
Cultura Documentos
Androi
Androi
Pontap inicial...
Toshi Kurauchi
andrew.kurauchi@gmail.com
@toshikurauchi
http://developer.android.com/index.html
Dvidas?
Obrigado!
1 = Android 1.0
2 = Android 1.1
3 = Android 1.5
4 = Android 1.6
5 = Android 2.0
6 = Android 2.0.1
7 = Android 2.1.x
8 = Android 2.2.x
...
Criando o emulador...
- Window
'-- AVD Manager
'-- New...
Criando o emulador...
- Window
'-- AVD Manager
'-- New...
Criando o emulador...
- Window
'-- AVD Manager
'-- New...
Criando o emulador...
- Window
'-- AVD Manager
'-- New...
Criando o emulador...
- Window
'-- AVD Manager
'-- New...
Criando o emulador...
- Window
'-- AVD Manager
'-- New...
Criando o emulador...
- Window
'-- AVD Manager
'-- New...
Criando o emulador...
- Window
'-- AVD Manager
Dica:
'-- New...
Criando o emulador...
- Window
'-- AVD Manager
Dica:
'-- New...
NUNCA
Nunca feche o emulador
JAVA
<XML>
JAVA
Densidades de tela
Aprox. 1mm
Fonte: http://ignorethecode.net/blog/2012/03/16/ipad_screen_microscope/
Resource qualifiers
Strings, dimenses,
cores, valores
numricos, ...
Strings, dimenses,
cores, valores
numricos, ...
strings.xml
AndroidManifest.xml
AndroidManifest.xml
AndroidManifest.xml
AndroidManifest.xml
AndroidManifest.xml
AndroidManifest.xml
AndroidManifest.xml
Tela
=
Tela
=
Tela
Activity (Java)
=
Tela
Activity (Java)
=
Tela
Activity (Java)
+
layout (xml)
Layout XML
Layout XML
LinearLayout
(vertical)
Layout XML
LinearLayout
(vertical)
Layout XML
LinearLayout
(vertical)
Layout XML
LinearLayout
(vertical)
Layout XML
LinearLayout
(vertical)
Layout XML
LinearLayout
(horizontal)
Layout XML
LinearLayout
(horizontal)
Layout XML
LinearLayout
(horizontal)
Layout XML
LinearLayout
(horizontal)
Layout XML
LinearLayout
(horizontal)
Layout XML
RelativeLayout
Layout XML
RelativeLayout
Layout XML
RelativeLayout
Layout XML
RelativeLayout
Views
Views
<RadioButton>
Views
<RadioButton>
<DatePicker>
Views
<RadioButton>
<RatingBar>
<DatePicker>
Views
<TextView>
Texto
<RadioButton>
<RatingBar>
<DatePicker>
Views
<TextView>
Texto
<RadioButton>
<Button>
<RatingBar>
<DatePicker>
Views
<TextView>
Texto
<RadioButton>
<RatingBar>
<EditText>
<Button>
<DatePicker>
Views
<CheckBox>
<TextView>
Texto
<RadioButton>
<RatingBar>
<EditText>
<Button>
<DatePicker>
Views
<CheckBox>
<TextView>
Texto
<RadioButton>
<RatingBar>
Etc...
<EditText>
<Button>
<DatePicker>
Activity
Activity
Activity
Activity
onCreate()
onStart()
onResume()
Rodando...
onPause()
onStop()
onDestroy()
Activity
Activity
onCreate()
onStart()
onResume()
XML
Activity
Activity
Layout XML
<Button
android:layout_width="..."
android:layout_height="..."
android:layout_id="@+id/botao"
/>
findViewById(?)
Layout XML
<Button
android:layout_width="..."
android:layout_height="..."
android:layout_id="@+id/botao"
/>
Diretrio res
Diretrio res
Button
findViewById(R.id.botao)
Clicando no boto
Permisses...
Permisses...
Acessando a internet...
Acessando a internet...
Acessando a internet...
Acessando a internet...
HttpClient c = new DefaultHttpClient();
Acessando a internet...
HttpClient c = new DefaultHttpClient();
HttpGet get =
new HttpGet("http://www.ime.usp.br");
Acessando a internet...
HttpClient c = new DefaultHttpClient();
HttpGet get =
new HttpGet("http://www.ime.usp.br");
HttpResponse response = c.execute(get);
Acessando a internet...
HttpClient c = new DefaultHttpClient();
HttpGet get =
new HttpGet("http://www.ime.usp.br");
HttpResponse response = c.execute(get);
String conteudo =
EntityUtils.toString(response.getEntity());
Acessando a internet...
HttpClient c = new DefaultHttpClient();
HttpGet get =
new HttpGet("http://www.ime.usp.br");
HttpResponse response = c.execute(get);
t
String conteudo =
e
n
r
e
t
EntityUtils.toString(response.getEntity());
In
e
d
o
s
is
m
r
e
Fragments
Fragments
Fragments
Fragments
Fragments
Activity
!
!
!
)
b
o
d
r
i
art
Activity
p
a
n
o
H
(
0
3.
m
o
eyC
!
!
!
)
b
m
o
eyC
Activity
n
o
Compatibility.0 (H
3 Library
o
d
r
i
t
ar
p
a
ActionBar
ActionBar
ActionBar
ActionBar
ActionBar
ActionBar
res/menu/main_menu.xml
ActionBar
ActionBar
ActionBar
0
.
3
o
d
r
i
t
r
pa
Links teis
http://developer.android.com/index.html
http://developer.android.com/design/index.html
http://actionbarsherlock.com/
http://pivotal.github.com/robolectric/
http://blog.stylingandroid.com/
http://code.google.com/p/google-gson/