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

액션바 탭과 드로어 겹침문제

0 추천

위 화면에서와 같이 플레그먼트로 드로워를 만들었고 탭을 구현 했는데 화면이 자꾸 겹칩니다. 어떻게 해야해야하나요 ?

<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.konging.TimeLine" >
 
    <!--
         As the main content view, the view below consumes the entire
         space available using match_parent in both dimensions.
    -->
 
    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
 
    <!--
         android:layout_gravity="start" tells DrawerLayout to treat
         this as a sliding drawer on the left side for left-to-right
         languages and on the right side for right-to-left languages.
         If you're not building against API 17 or higher, use
         android:layout_gravity="left" instead.
    -->
    <!--
         The drawer is given a fixed width in dp and extends the full height of
         the container.
    -->
 
    <fragment
        android:id="@+id/navigation_drawer"
        android:name="com.example.konging.NavigationDrawerFragment"
        android:layout_width="@dimen/navigation_drawer_width"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        tools:layout="@layout/fragment_navigation_drawer" />
 
</android.support.v4.widget.DrawerLayout>
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.konging.TimeLine" >
 
    <!--
         As the main content view, the view below consumes the entire
         space available using match_parent in both dimensions.
    -->
 
    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
 
    <!--
         android:layout_gravity="start" tells DrawerLayout to treat
         this as a sliding drawer on the left side for left-to-right
         languages and on the right side for right-to-left languages.
         If you're not building against API 17 or higher, use
         android:layout_gravity="left" instead.
    -->
    <!--
         The drawer is given a fixed width in dp and extends the full height of
         the container.
    -->
 
    <fragment
        android:id="@+id/navigation_drawer"
        android:name="com.example.konging.NavigationDrawerFragment"
        android:layout_width="@dimen/navigation_drawer_width"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        tools:layout="@layout/fragment_navigation_drawer" />
 
</android.support.v4.widget.DrawerLayout>
매인 액티비티 xml입니다.

 

kokiboy (140 포인트) 님이 2015년 4월 21일 질문
kokiboy님이 2015년 4월 21일 수정

1개의 답변

0 추천
구현한 xml 을 올리세요
aucd29 (218,390 포인트) 님이 2015년 4월 21일 답변
소스를 전부다 올리면 되나요 ?
main layout  을 구성한 xml 만 올리세요 기본 코드면 res/layout/activity_main.xml 이겠죠
xml소스코드 올렸습니다.
붙여넣기가 2번 된거죠?
그런네요 그런데 저기 탭화면에있는것은 탭 버튼에 인텐트시킨 다른 액티비티클래스 입니다.
저기 탭화면에있는것은 탭 버튼에 인텐트시킨 다른 액티비티클래스 입니다. <- 이게 무슨 의미인지를 모르겠네요?

일단 첫 추측으로는 xml 내에  layout 문제일 거라고 생각했는데 현재 올리신 코드는 전혀 수정되지 않은 부분이라서 추측하기가 애매하네요
...