마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 탭을 상하로 배치할수 있나요?

0 추천

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"   
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="center_horizontal">
 <TabHost
 android:id="@android:id/tabhost"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent" >

  
      <FrameLayout
         android:id="@android:id/tabcontent"
         android:layout_width="fill_parent"    
         android:layout_height="fill_parent"/>                
     <TabWidget
         android:id="@android:id/tabs"                    
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:gravity="bottom" />
 </TabHost>
</LinearLayout>

위처럼 하면 하단에 탭이 생기는데 상하로 탭이 생기게 할려면 어떻게 해야하나요?

TabWidget 을 2개를 설정을 하니까 에러가 납니다

어떻게 해야하나요"?

익명사용자 님이 2013년 3월 15일 질문

1개의 답변

0 추천
자세한 내용은 모르겠지만 제약조건이 많아서 그런지

기본 지원하는 탭은 되도록이면 사용하지 말라고 하더군요.

커스텀을 해야 합니다.

탭버튼은 버튼이나 텍스트뷰를 이용해 원하는 위치에 배치하고

탭내용은 프레임 레이아웃이나 프레그먼트를 이용해서 탭버튼을 누를 때 화면 전환을 해주시면 될 것 같습니다.
appa (3,380 포인트) 님이 2013년 3월 15일 답변
...