Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 65 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
65
Dung lượng
1,49 MB
Nội dung
L T A IH G G IH H H I H H G HI H H G GHI I H I G GVHD: SVTT: Khoa: H H G I H H 09SPT L T A I H G G I 1.1 1.2 1.3 Android Platform: 1.3.1 Linux Kernel 1.3.2 10 1.4 12 1.4.1 Activity: 12 1.4.2 Service: 16 1.4.3 Content Provide: 16 1.4.4 Broadcast Receiver: 17 1.5 AndroidManifest.xml: 19 1.6 Intent 21 I 21 I 23 I h 25 1.6.4 Intent Filter 26 I 27 H G H H G I 29 29 29 29 31 2.2 XML Android 31 G 32 G 33 2.2.3 giao 33 34 36 36 H 39 2.4.3 H 45 H G G G G H 52 G 52 53 53 56 56 56 H 57 L T A H I I H H G H I 63 65 L T A I C C N D M C GPS C N C S M V A T ” L T - T - T A A A E - N - X A Android - Tìm ki m tài li u t nhi u ngu n, ph n tích, t ng h p tài li D A - Nghiên c u, l a ch n công c - Xây d ng ph n m E A L T A H G 1.1 G I Android: A A G O H A A ” K W A O H A M A A M A I API application programming interface ) nên N C A J S A A y L T A 1.2 M A è ẵ M G C SMS C thông tin G P S G V M ỉ T W K C ) T …) Android Marketplace – T é ẵ J Android SDK(Software Development Kit) C ẵ T … ẵ L T A 1.3 Android Platform: A N A L Và, có, T C C + + A J T ẵ J M A SDK ẵ H A A Linux A T H è L T A 1.3.1 Linux Kernel H L A L T … L T A T L L dây 1.3.2 Library 1.3.2.1 Library T C C++ M (Libc), CSDL F S L ) T ) S S D Open GL/ES) 1.3.2.2 Android RunTime: P J P J T Collections, File A M A O ) JVM) C T L ) J IO Java ( Dalvik Virtual Machine) J JRE J D J R E ) S Go 10 L T A B A D T V T ) V v ỉ T V = ) V B I R H ); P V B I R H A H K ="@+ H ẻT R A @+ H H " H ” K ="@+ V " L ) ẻ T E V R H T A C T C K A A C C T N N T 51 L T A H G G G G H 3.1 G T C é ũ M … T T ?H ỉ … C C T B ẻỷ ỉ không T ” 52 L T A N S tên C tay S 3.3.1 53 L T A 3.3.2 54 L T A 3.3.3 CSDL : Load() : Load() 55 L T A 3.3.4 Load () CSDL 3 C text F assets/ 3.4.2 nh C M A L C B C T A L L listview CotichAdapter: L Cotichview: L 56 L T A TruyenCuoiActivity: L TruyenCuoiAdapter: TruyenCuoiView: QuaTangActivity: L QuaTangAdapter: QuaTangView: ListItem: ShowBook: H K onCreat() MainActivity() button protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); CustomButton cotich = (CustomButton) findViewById(R.id.iconCoTich); CustomButton truyencuoi = (CustomButton) findViewById(R.id.iconTruyenCuoi); CustomButton quatang = (CustomButton) findViewById(R.id.iconQuaTang); cotich.setOnClickListener(new OnClickListener() { @Override 57 L T A public void onClick(View v) { OpenCoTichActivity(); } }); truyencuoi.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { OpenTruyenCuoiActivity(); } }); quatang.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub OpenQuaTangActivity(); } }); } H 58 L T A - K 59 L T A C - V readFileFromAsset () A s: private String readFileFromAsset(String id) throws Exception{ // TODO Auto-generated method stub String name= new String(); name = id+".txt"; InputStream in = getAssets().open(name); byte[] buffer = new byte[in.available()]; 60 L T A in.read(buffer); String chuoi = new String(buffer); Log.i("", ""+chuoi); in.close(); return chuoi; } - Sa S B Public class ShowBook extends Activity { TextView tv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_show_book); tv=(TextView)(findViewById(R.id.textview1)); Bundle bd = getIntent().getExtras(); String content =bd.getString(“book”); tv.setText(“”+content); } 61 L T A - G é 62 L T A H S G H T I A ” V A J ũ A T A A T A Android - S A P A - E A H A - H tro A I A T 63 L T A H X X N A … T è T è E H Vũ 64 L T A I I H H http://www.vogella.com/articles/AndroidListView/article.html http://android.vn/ http://www.codeproject.com/ Beginning Android (2009) by Mark L.Murphy The Busy Coders Guide to Android Development(2011) by Mark L.Murphy Unlocking Android by W Frank Ableson Pro Android by Sayed Y Hashimi and Satya Komatineni 65 ... ) V