2015-04-24 27 views
6

Ben ksoichiro android-Android BrowserServiceView kullanıyorum. Onun örnek Esnek Alanını viewpager ile kullanıyorum ve değiştirdim. Ama bir problem var. Benim xml'de 2 tane android var: fitsSystemWindows. LinearLayout'ta ve diğeri Araç Çubuğunda. LinearLayout'da iyi çalışıyor. ama Araç Çubuğunda çalışmıyor. Bu neden oluyor? Teşekkür ederiz. benim kötü İngilizandroid: fitsSystemWindows araç çubuğunda çalışmıyor

gidecekseniz benim xml kodu için üzgünüm:

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

<com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout 
    android:id="@+id/container" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <ImageView 
     android:id="@+id/image" 
     android:layout_width="match_parent" 
     android:layout_height="@dimen/flexible_background" 
     android:scaleType="centerCrop" 
     android:src="@drawable/bridge" /> 

    <View 
     android:id="@+id/overlay" 
     android:layout_width="match_parent" 
     android:layout_height="@dimen/flexible_background" 
     android:background="?attr/colorPrimary" /> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="vertical" 
     android:fitsSystemWindows="true"> 

     <FrameLayout 
      android:id="@+id/header" 
      android:layout_width="match_parent" 
      android:layout_height="@dimen/flexible_height"> 

      <TextView 
       android:id="@+id/title" 
       android:layout_width="match_parent" 
       android:layout_height="?attr/actionBarSize" 
       android:layout_gravity="bottom" 
       android:layout_margin="@dimen/abc_action_bar_default_padding_material" 
       android:ellipsize="end" 
       android:gravity="center_vertical" 
       android:maxLines="1" 
       android:minHeight="?attr/actionBarSize" 
       android:textColor="@android:color/white" 
       android:textSize="20sp" /> 
     </FrameLayout> 

     <com.bright.nongkrongyuk.ui.SlidingTabLayout 
      android:id="@+id/sliding_tabs" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_gravity="bottom" 
      android:background="@android:color/black" 
      app:sliding_textColor="@drawable/sliding_tab_profile" /> 

     <android.support.v4.view.ViewPager 
      android:id="@+id/pager" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="@android:color/background_light" /> 
    </LinearLayout> 
</com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout> 

<android.support.v7.widget.Toolbar 
    android:id="@+id/toolbar" 
    android:layout_width="match_parent" 
    android:layout_height="?attr/actionBarSize" 
    android:background="@android:color/transparent" 
    android:minHeight="?attr/actionBarSize" 
    android:fitsSystemWindows="true" /> 
</FrameLayout> 

cevap

12

android:fitsSystemWindows özelliğin bir dolgu ayarlar. Bu, uydurmanın çocuk görüşleri için geçerli olduğu anlamına gelir. Sen O ekrana takılan manzaralı uygun tam ekran düzeni yapmak gerçekten zor olan bir iç içe Layout

içine FrameLayout bu ya uygulamak veya Toolbar koymak zorunda kalacaktı. Status ve/veya Navigationbar

'a bağlı olarak dolgu alabilecek bir içerik görünümünü bildirebileceğim Fragment alt sınıfını
İlgili konular