'2015/06'에 해당되는 글 1건

  1. 2015.06.09 탭뷰 스크롤
2015. 6. 9. 09:47


    <TabHost

        android:id="@+id/tabhost"

        android:layout_width="match_parent"

        android:layout_height="match_parent" >


        <LinearLayout

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:orientation="vertical" >

                <HorizontalScrollView

                    android:id="@+id/hsTab"

                    android:layout_width="match_parent"

                    android:layout_height="wrap_content"

                    android:fillViewport="true"

                    android:scrollbars="none" >


                    <TabWidget

                        android:id="@android:id/tabs"

                        android:layout_width="wrap_content"

                        android:layout_height="wrap_content" >

                    </TabWidget>

                </HorizontalScrollView>


            <FrameLayout

                android:id="@android:id/tabcontent"

                android:layout_width="match_parent"

                android:layout_height="match_parent" >


                    <include

                        android:id="@+id/iTab"

                        android:layout_width="match_parent"

                        android:layout_height="wrap_content"

                        layout="@layout/tab_layout" />

            </FrameLayout>

        </LinearLayout>

    </TabHost>


탭 4개쯤 되니까 스크롤 자동으로 생기고 옆으로 휙휙 넘어감.



'안드로이드' 카테고리의 다른 글

웹에서 액티비티 호출  (2) 2015.11.26
뒤로가기 2회시 종료  (0) 2015.10.19
문자열로 클래스 만들기  (0) 2015.05.22
xml안에 xml넣기  (1) 2015.05.22
트리리스트 3단계 이상 내려가는 소스  (0) 2015.05.22
Posted by newkie