4. Drawable
xhdpi 2.0
hdpi 1.5
mdpi 1.0
ldpi 0.75
This means that if you generate a 200x200 image for xhdpi devices,
you should generate the same resource in 150x150 for hdpi,
100x100 for mdpi, and 75x75 for ldpi devices.
ref:http://developer.android.com/training/basics/supporting-devices/screens.html
Nexus 7
true tab3g
Thursday, August 8, 13
8. Activity?
จะมีแต่ view เดี่ยวๆโปรแกรมทํางานไม่ได้
if it has a UI, it’ll have at least one
Activity
Relationship between an Activity with a
UI screen ---> MVC paradigm (ref:
Android in action )
Thursday, August 8, 13
9. A
B
A
Activity
Intent intent = new Intent(this, A.class);
startActivity(intent);
Intent intent = new Intent(this, B.class);
startActivity(intent);
Intent intent = new Intent(this, A.class);
startActivity(intent);
ถ้ากดBack สองที ?
show A1
show B1
show A
Thursday, August 8, 13
12. • Measure: 0.977ms
• Layout: 0.167ms
• Draw: 2.717ms
The timings for rendering a complete list item using this layout are:
• Measure: 0.598ms
• Layout: 0.110ms
• Draw: 2.146ms
http://developer.android.com/training/improving-layouts/optimizing-layout.html
Thursday, August 8, 13
13. Most of this time difference is due to the use of
layout_weight in the LinearLayout design,
which can slow down the speed of measurement
http://developer.android.com/training/improving-layouts/optimizing-layout.html
Thursday, August 8, 13