2017-03-19 7 views
0

접히는 툴바가 포함 된 활동에 전체 화면 대화 상자를 표시하는 데 문제가 있습니다. (다른 활동에 내가 가지고있는 것처럼)Android 전체 화면 대화 상자 조각 모음 및 접기 툴바 문제

enter image description here

내가 무너 도구 모음을 데려 갈 경우 내가 전체 화면 대화 상자를 표시하면 아래 그림과 같이 도구 모음 대신에 상태 표시 줄 아래에있는 상태 표시 줄 아래에 간다 , 나는이 문제가 없다. 대화 상자의 툴바는 상태 표시 줄 아래에 완벽하게 표시됩니다. 여기 내 XML은 활동이다 : 내 붕괴 도구 모음 사용자가 설정 한 방식에 문제가 아무것도

<?xml version="1.0" encoding="utf-8"?> 
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true" 
    tools:context="com.casillassportsapps.mytrackfieldteam.views.RosterDetailsActivity"> 

    <android.support.design.widget.AppBarLayout 
     android:id="@+id/app_bar" 
     android:layout_width="match_parent" 
     android:layout_height="@dimen/roster_details_app_bar_height" 
     android:theme="@style/AppTheme.AppBarOverlay"> 

     <android.support.design.widget.CollapsingToolbarLayout 
      android:id="@+id/toolbar_layout" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      app:contentScrim="?attr/colorPrimary" 
      app:expandedTitleTextAppearance="@style/TextAppearance.AppCompat.Large" 
      app:layout_scrollFlags="scroll|exitUntilCollapsed"> 

      <ImageView 
       android:id="@+id/photoImageView" 
       android:layout_width="@dimen/roster_details_image_size" 
       android:layout_height="@dimen/roster_details_image_size" 
       android:layout_gravity="center_horizontal" 
       android:layout_marginTop="@dimen/activity_vertical_margin" 
       android:adjustViewBounds="true" 
       android:importantForAccessibility="no" 
       android:src="@drawable/ic_account_circle_white" 
       app:layout_collapseMode="parallax" /> 

      <android.support.v7.widget.Toolbar 
       android:id="@+id/toolbar" 
       android:layout_width="match_parent" 
       android:layout_height="?attr/actionBarSize" 
       app:layout_collapseMode="pin" 
       app:popupTheme="@style/AppTheme.PopupOverlay" /> 

     </android.support.design.widget.CollapsingToolbarLayout> 
    </android.support.design.widget.AppBarLayout> 

    <FrameLayout 
     android:id="@+id/detailContainer" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 

    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/fab" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_margin="@dimen/fab_margin" 
     app:layout_anchor="@id/app_bar" 
     app:layout_anchorGravity="bottom|right|end" 
     app:srcCompat="@drawable/ic_assessment_white_24dp" /> 

</android.support.design.widget.CoordinatorLayout> 

있습니까? 고맙습니다.

+0

사용하는 지원 라이브러리 버전은 무엇입니까? –

+0

com.android.support:appcompat-v7:25.3.0 – TrackDave

답변

0

이 시도 :

모두 AppBarLayoutCollapsingToolbarLayout

전체 코드 android:fitsSystemWindows="true"를 추가

<android.support.design.widget.CoordinatorLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true" 
    tools:context="com.casillassportsapps.mytrackfieldteam.views.RosterDetailsActivity"> 

    <android.support.design.widget.AppBarLayout 
     android:id="@+id/app_bar" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
     android:fitsSystemWindows="true"> 

     <android.support.design.widget.CollapsingToolbarLayout 
      android:id="@+id/toolbar_layout" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      app:layout_scrollFlags="scroll|exitUntilCollapsed" 
      app:contentScrim="?attr/colorPrimary" 
      app:expandedTitleMarginStart="48dp" 
      app:expandedTitleMarginEnd="64dp" 
      android:fitsSystemWindows="true"> 

      <ImageView 
       android:id="@+id/photoImageView" 
       android:layout_width="@dimen/roster_details_image_size" 
       android:layout_height="@dimen/roster_details_image_size" 
       android:layout_gravity="center_horizontal" 
       android:layout_marginTop="@dimen/activity_vertical_margin" 
       android:adjustViewBounds="true" 
       android:importantForAccessibility="no" 
       android:src="@drawable/ic_account_circle_white" 
       android:fitsSystemWindows="true" 
       app:layout_collapseMode="parallax" /> 

      <android.support.v7.widget.Toolbar 
       android:id="@+id/toolbar" 
       android:layout_width="match_parent" 
       android:layout_height="?attr/actionBarSize" 
       app:popupTheme="@style/ThemeOverlay.AppCompat.Light" 
       app:layout_collapseMode="pin" /> 

     </android.support.design.widget.CollapsingToolbarLayout> 

    </android.support.design.widget.AppBarLayout> 

    <FrameLayout 
     android:id="@+id/detailContainer" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 

    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/fab" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_margin="@dimen/fab_margin" 
     app:layout_anchor="@id/app_bar" 
     app:layout_anchorGravity="bottom|right|end" 
     app:srcCompat="@drawable/ic_assessment_white_24dp" /> 

</android.support.design.widget.CoordinatorLayout> 
+0

감사합니다. 게시하기 전에 실제로 시도했습니다. : – TrackDave

+0

시차에 대해 android : fitsSystemWindows = "true"'이미지를 추가하려고 시도 했습니까? Image – rafsanahmad007

+0

방금 ​​그 이미지를 줬음 좋음 – TrackDave