2016-11-02 8 views
2

Android 4.3でAndroidアプリケーション6が正常に動作していますが、Android 7では同じデザインが使用できません。Android Nougat:ViewPagerを使用しているとき、下部レイアウトがNexusのナビゲーションボタンの後ろに隠れています

何が起こる必要があります。

enter image description here

実際ヌガーに何が起こる:

enter image description here

TextViewには、その高さの余裕がある場合はヌガーで期待どおりに、それが表示されるでしょう、しかしそれは底なしのプレヌガートにはないでしょう。

これは、このフラグメントがViewPagerにある場合にのみ発生します。さもなければそれはちょうど良いを示す

XML:

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent"> 
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:layout_marginBottom="48dp"> 
     <TextView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:text="CONTENTS HERE"/> 
    </ScrollView> 
    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="48dp" 
     android:layout_gravity="bottom" 
     android:visibility="gone" 
     android:text="YOU CANNOT SEE ME"/> 
</FrameLayout> 

注:これは唯一の本当のデバイス上で、AndroidのStudioのデザインビューでは発生しません。このスクリーンショットは、実際のデバイスで何が起こるかのレプリカです。

誰でもアイデアはありますか?

+0

私は、この特定の活動のためにマニフェストに' fitsSytemWindow = true'をを入れて、同じ問題を抱えていたが、私のために働い –

+0

?私のために働かなかった。 – zed

+0

いいえ、マニフェストで行う必要があります。 –

答えて

0

修正が見つかりました。

私は、それが固定された、レイアウト動作を除去することにより

<android.support.v4.view.ViewPager 
    android:id="@+id/vpTabs" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    app:layout_behavior="@string/appbar_scrolling_view_behavior" 
    android:background="@android:color/white" /> 

を使用していました。あなたは活動のルートビューのために `fitsSystemWindows = true`に設定意味@MohammedAtif

<android.support.v4.view.ViewPager 
    android:id="@+id/vpTabs" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@android:color/white" /> 
関連する問題