1 / 47

User Interface

User Interface. WPF Component. Android GUI Tool. Optimized Layout Algorithm. Inter. XML Writer. OpenGL API. Web World. Today App(Core ). User Interface APIs. Data structure manager. Interface. Web Data Analysis Module. Home / Setting (Tab layout). Time (MM/DD HH:MM).

uzuri
Download Presentation

User Interface

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. User Interface WPF Component Android GUI Tool Optimized Layout Algorithm Inter XML Writer OpenGLAPI

  2. Web World Today App(Core) User Interface APIs Data structure manager Interface Web Data Analysis Module Home / Setting (Tab layout) Time (MM/DD HH:MM) Info display1 User World Snooze Info display2 Timer Module Dismiss Info display3 Middle Info display4 Alarm Module User Interface APIs Interface Configuration Manager

  3. Today App(Core) Web World 3. Change Activity & Run Parser Web Data Analysis Module User Interface APIs Web-pages in Website Interface Data structure manager HTML Parser XML Parser Web DB server 5. Save Web data Parsing DataStructure Open APIs 4. HTTP Request & Respond Timer Module User World Time Check Thread 2. RunRegistered Task Registered Task Structure Middle Alarm Module User Interface APIs 6. Show data In app Alarm Event Notification 1. Request Setup App Module Interface Configuration Manager Configuration Data Storage(for setup)

  4. XML Parser HTML Parser DocumentBuilderFactory(SAX Parser) HTML Parser Request Request HttpURLConnection HttpURLConnection Response Response Get HTML file Get XML file Input Stream Input Stream Get Start Point Get End Point Document class Remove unnecessary Data Ask to run getElement by Name Get Web Data that a user needs StringTokenizer NodeList Return all data In String StringBuilderclass String Result ArrayList<String>

  5. Item Maker Custom Class Set Mapping Resource Set Data Manufacturer Web World TODAY Manager(CORE) Web Data Analysis Module Request & Response Thread Creator HTML Parser Interface Serialize & Deserialize Module Thread Handler XML Parser Alarm Module Object Serializer Time Check Thread Object Deserializer User World Task Executor Interface Ring & Vibration Creator Note module DataBaseAccessor Interface Setup App Module Note Creator & Editor Configuration Manager Configuration Data Storage(for setup) Data Storage DB SharedPreference FileSystm

  6. XML Parser HTML Parser NEWS Parsing Handler Notice Handler Weatjer Parsing Handler Food Handler Thread Creator TimeTable Handler Thread Handler

  7. 전체 Package에 대한 설명을 한다.

  8. Item Maker Custom Class Set Mapping Resource Set Data Manufacturer Web World TODAY Manager(CORE) Web Data Analysis Module 2. Request & Response Thread Creator HTML Parser 3. Get FileStream Serialize & Deserialize Module Thread Handler XML Parser 1. Run registeredTask Alarm Module Object Serializer Time Check Thread Object Deserializer User World Task Executor Ring & Vibration Creator 2. Request to access DB 3. Get Note module DataBaseAccessor Note Creator & Editor 3. Run Query 2.2 Return String Data Storage DB SharedPreference FileSystm

  9. Item Maker Custom Class Set Mapping Resource Set Data Manufacturer Web World TODAY Manager(CORE) Web Data Analysis Module 4. Parsing Thread Creator HTML Parser Serialize & Deserialize Module Thread Handler XML Parser 1. Run registeredTask Alarm Module Object Serializer Time Check Thread Object Deserializer 6. Show Activities User World Task Executor Ring & Vibration Creator 2. Request to access DB 5. Shot String Note module DataBaseAccessor 3. Run Query Note Creator & Editor 4. Return String Data Storage DB SharedPreference FileSystm

  10. HTTP Parser 부분이 들어가야 할 자리

  11. XML Parser HTML Parser DocumentBuilderFactory(SAX Parser) HTML Parser Request Request HttpURLConnection HttpURLConnection Response Response Get HTML file Get XML file Input Stream Input Stream Get Start Point Get End Point Document class Remove unnecessary Data Ask to run getElement by Name Get Web Data that a user needs StringTokenizer NodeList Return all data In String StringBuilderclass String Result ArrayList<String>

  12. Global Event? Local Event? Running task As Service Use Global Event AndroidMechanism

  13. 1. BraodCaset Sender 생성 2. System Service 등록 3. BroadcastReceiver생성 4. 사용자가 정의한 작업 수행

  14. AlarmModule.java ServiceBroadcast 등록 AlarmTask.java Vibration Bell Creator BroadCast Receiver Dialog 띄우기 AlarmDialog.java Main_Activity 띄우기

  15. Android ListView Mechanism

  16. ListView1 3개의 ListView들에 각각의 Item들을동적으로 추가하는 방식으로 설계되어 있다. ListView2 ListView3

  17. Web & DB Adapter Package Object Handling Package Notice_Adapter.java Food_Adapter.java Memo_Adapter.java TT_Adapter.java Weather_Adapter.java Dankook_Notice.java Food.java Memo.java News.java TimeTable.java Weather.java 2. parsingInfo() MainActivity 3. ArrayList<object> 1. Create Object 4. Create Adapter Register Adapter into ListViews

  18. 아래와 같이 BaseAdapter를 상속받은 형태이다

  19. 동적 Layout 접근을 위한 Resource Mapping R.Java Mapping DataStructure TreeMap& HashMap XML Data 위 과정을 통하여, 동적으로 Layout Resource에 접근할 수 있다.

  20. Android Activity Communication Mechanism Serialization Byte of Stream Intent putExtra method

  21. intent.putExtra("FoodArray", ObjectSerializer.serialize((ArrayList<ccFoodItem>)food.getArrayList())); … intent.putExtra("TimeTableArray", ObjectSerializer.serialize((ArrayList<ccTTItem>)timeTable.getArrayList())); …. intent.putExtra("NewsArray", ObjectSerializer.serialize((ArrayList<News_Info>)news.getArrayList())); ….. Intent를 활용하여 Parsing된 ArrayList를 넘긴다 Intent

  22. Android Data Management Mechanism SharedPreference SQLite SharedPreference : 안드로이드 내부에 저장, 비교적 간단한 자료들을 저장 SQLite : Android SDK에서는 SQLite를 사용하여 DB를 생성, 수정, 삭제 할 수 있음

  23. 이전 Category 정보를 저장하기 위하여 SharedPreference에 categoryInfo라는 Key를 가지는 String value를 저장한다.

  24. SQLite를 활용하여 구현한 Memo Module

  25. 어려웠던 점 1. 성능 최적화 문제

  26. XML 문서 <students> <student> … </student> </stduents> XML 문서 <students> <student> … </student> </stduents> startDocument() startElement() startElement() characters() endElement() endElement() endDocument() DOM Parser VS SAX Parser • SAX와 DOM 처리 방식 비교 • DOM 처리 방식(트리 기반 API) • SAX 처리 방식(이벤트 기반 API) 파싱 이벤트를 callback을 통해서 애플리케이션에 직접전달하는 구조

  27. Start at the Same time • 메시지 큐(Message Queue) : 메시지가 저장되는 장소. • 메시지나 Runnable 객체는 일단 큐에 저장되고 들어온 순서대로 순차적으로 처리된다. • 루퍼(Looper) : 메시지 큐에서 메시지를 꺼내어 핸들러로 전달한다. Thread 1 Thread 2 Thread 3 Thread 1 Run() completed Thread 2 completed Parsing() Parsing() Thread 3 completed Parsing() Handler completedTaskNum++; if(completedTaskNum == 3) { for(int i=0;i<3;i++) { listView[i].setAdapter(baseAdapter[i]) listView[i].setOnItemClickListener(onclickEventClass);} completedTaskNum= 0; mainLayout.setVisibility(View.VISIBLE); Thread thread[3]

  28. Start thread in order 평균적으로 3배 이상의 시간이 소요된다 Thread 1 Thread 2 Thread 3

  29. Event 발생 -> Handling 본 함수들은 SAX Parser안에 Interface형태로 정의되어 있다. Handler에서 본 함수들을 정의 해줘야 한다. Weather Handler News Handler

  30. 코드와 Layout이 분리되어 있다. Native Java와 C# C++에 익숙한 우리에게는 그리 친숙하지 않다.

  31. 본 LifeCycle을 정확히 이해하고 있어야만 우리가 원하는 Activity 를 실행 시킬 수 있다. ex) Back을 눌러 다시 예전 Activity로 돌아올 경우 onCreate()는 실행되지 않고 onResume()이 실행된다.

  32. 어려웠던 점 Android SDK Mechanism Layout Mechanism : xml과 source 파일 분리 Data Trasfer Mechanism : 왜 항상 Intent를 써야 하는가? API : 다양한 API를 적절히 적용하기 쉽지 않음 해결방법 : 안드로이드 프로그래밍 학습 -> 익숙해질 때까지 코딩

  33. 실행화면 Screen shot

More Related