2017-07-20 5 views
1

FraglemtLayoutバーがページのコンテンツと重なっています。 、つまりMy TabLayoutはページのメインコンテンツと重複しています。フラグメントオーバーラップするコンテンツの配置

これは、このモデルレイアウトはcardviewを含んでMainActivityレイアウト

<?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/lib/com.example.feelingoodlivinbeta.socialdreams_a1.MainMenuActivity" 
     xmlns:tools="http://schemas.android.com/tools" 
     android:id="@+id/main_content" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:fitsSystemWindows="true" 
     tools:context="com.example.feelingoodlivinbeta.socialdreams_a1.MainMenuActivity"> 


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

      <android.support.v7.widget.Toolbar 
       android:id="@+id/toolbar" 
       android:layout_width="match_parent" 
       android:layout_height="?attr/actionBarSize" 
       android:background="?attr/colorPrimary" 
       app:layout_scrollFlags="scroll|enterAlways" 
       app:popupTheme="@style/AppTheme.PopupOverlay"> 

      </android.support.v7.widget.Toolbar> 

      <android.support.design.widget.TabLayout 
       android:id="@+id/tabs" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" /> 

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

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

     </android.support.v4.view.ViewPager> 


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

あります。私は問題が

<?xml version="1.0" encoding="utf-8"?> 
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="250dp" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:orientation="horizontal" 
    app:layout_behavior="@string/appbar_scrolling_view_behavior" 
    android:layout_below="@id/fragmantRecycler"> 


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

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="40dp" 
      android:orientation="horizontal" 
      android:weightSum="1"> 

      <LinearLayout 
       android:layout_width="56dp" 
       android:layout_height="match_parent" 
       android:layout_weight="0.06" 
       android:orientation="horizontal"> 

       <ImageView 
        android:id="@+id/imageView4" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_weight="1" 
        android:src="@drawable/socialdreamlogo" /> 
      </LinearLayout> 

      <TextView 
       android:id="@+id/nameTxt" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_weight="3.67" 
       android:padding="10dp" 
       android:text="TextView" /> 
     </LinearLayout> 


     <ImageView 
      android:id="@+id/imageView" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:padding="10dp" 
      android:src="@drawable/placeholder" /> 


    </LinearLayout> 

</android.support.v7.widget.CardView> 

enter image description here

+0

コンテンツと重複していますか? – Dennis

+0

@Dennis断片のタブが画像の上にある、私はすべての詳細を傾けることはできません – SpriteAndDreams

+0

申し訳ありません、私はダムと聞こえるが、それはとても混乱しています。あなたの断片タブは何ですか?私には大丈夫だと思う。 – Dennis

答えて

0

を置かれている場所あなたの問題は、このラインに関連すると思わ分からない:

xmlns:app="http://schemas.android.com/apk/lib/com.example.feelingoodlivinbeta.socialdreams_a1.MainMenuActivity" 

に置き換えます

xmlns:app="http://schemas.android.com/apk/res-auto" 
+1

thnx thnx thnx、私はnevaがそのエラーを見つけただろう、thnk u much :) – SpriteAndDreams

関連する問題