안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
지그 안드로이드 프로그래밍 이라는 책을 싸서 보고 있는 초짜입니다.
그런데. 탭 부분에서 안되서 이렇게 글을 올립니다.
main.xml 아래와 같은데요.
TabHost requires a FrameLayout with id "android:id/tabcontent". 라는 메시지가 나타납니다.
책 소스와 같은데. 왜 이렇게 나오는지 모르겠네요. 아시는 분은
답변좀 바랍니다.
그럼 즐거운 주말 보내세요.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TabHost android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/tabhost">
<TabWidget android:id="@android:id/tabs"
android:layout_height="wrap_content"
android:layout_width="fill_parent"></TabWidget>
<FrameLayout android:id="@+id/tabcontent"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:paddingTop="64px">
<AnalogClock android:id="@+id/tab1"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_centerHorizontal="true"></AnalogClock>
<Button android:id="@+id/tab2"
android:text="단순한 버튼"
android:layout_height="fill_parent"
android:layout_width="fill_parent"></Button>
</FrameLayout>
</TabHost>
지그 안드로이드 프로그래밍 이라는 책을 싸서 보고 있는 초짜입니다.
그런데. 탭 부분에서 안되서 이렇게 글을 올립니다.
main.xml 아래와 같은데요.
TabHost requires a FrameLayout with id "android:id/tabcontent". 라는 메시지가 나타납니다.
책 소스와 같은데. 왜 이렇게 나오는지 모르겠네요. 아시는 분은
답변좀 바랍니다.
그럼 즐거운 주말 보내세요.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TabHost android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/tabhost">
<TabWidget android:id="@android:id/tabs"
android:layout_height="wrap_content"
android:layout_width="fill_parent"></TabWidget>
<FrameLayout android:id="@+id/tabcontent"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:paddingTop="64px">
<AnalogClock android:id="@+id/tab1"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_centerHorizontal="true"></AnalogClock>
<Button android:id="@+id/tab2"
android:text="단순한 버튼"
android:layout_height="fill_parent"
android:layout_width="fill_parent"></Button>
</FrameLayout>
</TabHost>