• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Basic android 1
 

Basic android 1

on

  • 218 views

 

Statistics

Views

Total Views
218
Views on SlideShare
218
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Basic android 1 Basic android 1 Presentation Transcript

    • Basic Android #1 Build your simple app Thursday, August 8, 13
    • Build Simple App download android sdk create your first app http://developer.android.com/sdk/index.html#mac-bundle Step 1 Thursday, August 8, 13
    • Structure of project src assets libs res * AndroidManifest.xml Thursday, August 8, 13
    • 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
    • AndroidManifest.xml เวลาอัพขึ้น market ต้องมากขึ้นเรื่อยๆ แสดง icon ของApp Activity นี้จะแสดงแต่แนวตั้ง Thursday, August 8, 13
    • Life Cycle Activity Thursday, August 8, 13
    • Thursday, August 8, 13
    • 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
    • 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
    • setcontentView(R.layout.list_item_icom); ImageView imgIcon = (ImageView)findViewById(R.id.icon); Thursday, August 8, 13
    • Layout LinearLayout RelativeLayout Thursday, August 8, 13
    • • 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
    • 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
    • Thank you for your Attention Thursday, August 8, 13