[Android] 63일차 - anr, xml parser :: 소림사의 홍반장!

[Android] 63일차 - anr, xml parser

2012. 12. 3. 20:58 - 삘쏘굿

63일차

ANR (Application Not Responding)
 - UI 쓰레드는 계속 작동이 되어야 하므로 오랜 기간 기다릴수는 없다.


XML Parser
 1. JDOM : 복잡한 구조에 유리 (한 번에 구조를 읽어놓고 파싱 된 상태에서 값 가져옴)
 2. JSAX
 3. XMLPullParser : 단순한 구조에 유리 (한 줄씩 읽으면서 파싱)

parsing VS format
원하는 문자열을 뽑아내는 것 VS 원하는 형태로 변환하는 것


url VS apache http library

 


<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <ListView
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

<!-- 리스트에 값이 없으면 empty라는 아이디의 텍스트뷰가 나오게 된다. -->
    <TextView
        android:id="@android:id/empty"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="test"
        android:visibility="gone"
        android:textAppearance="?android:attr/textAppearanceMedium"
        />

</FrameLayout>

다른 카테고리의 글 목록

Dev. 640시간 뭉개기/강의내용정리 카테고리의 포스트를 톺아봅니다