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

탭의 레이아웃 관련해서 궁금한 부분이 있습니다.

0 추천

 

안녕하세요~

3개의 탭중에 가장 오른쪽의 3번째  탭을 눌렀을 경우에, 아래의 사진처럼 나오게 하고 싶은데.. 어떻게 해야 이렇게될까요? 오른쪽 부분만, 이렇게 따로 빼서 저렇게 만든뒤에 날짜들을 선택을 하고, 3번째 탭의 컨텐츠 부분으로 가게하고 싶은데 어떻게 해야할지 몰라서 글을 씁니다.

아래의 소스를 한번 첨부해 보았습니다. 조금 추가되는 부분은, 아래의 댓글에 좀 더 달아보았습니다.

 

cal.jpg

 

<xml 파일입니다 >

<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" >

                <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                </TabWidget>

            <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="match_parent"
                android:layout_height="match_parent" >

                <ScrollView
                    android:id="@+id/tab1"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" >

                    <RelativeLayout 
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">


                        <ImageView
                            android:id="@+id/First_Tab_imageView"
                            android:layout_width="match_parent"
                            android:background="@drawable/first_tab_image"
                            android:layout_height="350dp"
                            android:paddingTop="20dp"
                            android:paddingBottom="20dp" />

                        
공산당 (1,960 포인트) 님이 2016년 11월 6일 질문
<Button
                            android:id="@+id/First_Tab_Button"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_below="@id/First_Tab_imageView"
                            android:text="tab1 선택"
                            android:layout_marginTop="20dp"
                            android:padding="20dp"
                            android:textSize="20dp"
                            android:layout_centerHorizontal="true"
                            android:textAlignment="center"
                            android:textColor="#9000ff"
                            android:background="@drawable/white_round_button" />

                    </RelativeLayout>

                </ScrollView>

                <ScrollView
                    android:id="@+id/tab2"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" >

                    <Button
                            android:id="@+id/button2"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="tab2 버튼"
                            android:textAppearance="?android:attr/textAppearanceMedium" />

                </ScrollView>

                <ScrollView
                    android:id="@+id/tab3"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" >

                    <TextView
                        android:id="@+id/textView3"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="tab3 TextView"
                        android:textAppearance="?android:attr/textAppearanceMedium" />

                </ScrollView>
            </FrameLayout>
        </LinearLayout>
</TabHost>

1개의 답변

0 추천
 
채택된 답변
이건 네비게이션 드로어를 사용하시면 될것같네용~~
대화니 (1,120 포인트) 님이 2016년 11월 6일 답변
공산당님이 2016년 11월 6일 채택됨
네 감사합니다 감사합니다 감사합니다
...