2016-08-06 14 views
1

XMLコード...デザインで線形レイアウトが表示されていますが、表示されていない状態で表示されていますか?

<LinearLayout 
     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" 
     android:orientation="vertical"> 

     <android.support.v7.widget.Toolbar 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:background="@color/orange" 
      android:id="@+id/toolbar" 
      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
      app:title="Online Music and Vidio Player" /> 

     <android.support.v4.widget.DrawerLayout 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      xmlns:app="http://schemas.android.com/apk/res-auto" 
      android:layout_height="match_parent" 
      android:layout_width="match_parent" 
      android:id="@+id/drawerLayout" 
      > 



      <FrameLayout 
       android:orientation="vertical" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:id="@+id/containerView"> 

    //<<------------------------------------------->>>> 
       <LinearLayout 
        xmlns:android="http://schemas.android.com/apk/res/android" 
        xmlns:tools="http://schemas.android.com/tools" 
        android:id="@+id/as" 
        android:layout_width="match_parent" 
        android:layout_height="73dp" 
        android:orientation="horizontal" 
        android:gravity="center_vertical" 
        android:background="@color/black" 
        android:paddingLeft="10dp" 
        android:paddingRight="10dp" 
        android:weightSum="1" 
        android:visibility="visible" 
        android:layout_gravity="bottom"> 
        <!-- Previous Button --> 
        <ImageButton 
         android:id="@+id/btnPrevious" 
         android:src="@drawable/btn_previous" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:background="@null"/> 
        <!-- Backward Button --> 
        <!-- Play Button --> 
        <ImageButton 
         android:id="@+id/btnPlay" 
         android:src="@drawable/btn_play" 
         android:layout_width="155dp" 
         android:layout_height="wrap_content" 
         android:background="@null" 
         android:layout_weight="1.03" /> 
        <!-- Forward Button --> 
        <!-- Next Button --> 
        <ImageButton 
         android:id="@+id/btnNext" 
         android:src="@drawable/btn_next" 
         android:layout_width="102dp" 
         android:layout_height="104dp" 
         android:background="@null" /> 
       </LinearLayout> 
//<<---------------------------------------------------->> 
      </FrameLayout> 






      <android.support.design.widget.NavigationView 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:app="http://schemas.android.com/apk/res-auto" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:layout_gravity="start" 
       android:id="@+id/shitstuff" 
       app:itemTextColor="@color/black" 
       app:menu="@menu/drawermenu" 
       android:layout_marginTop="-24dp" 
       /> 



     </android.support.v4.widget.DrawerLayout> 

    </LinearLayout> 

**ライン内のコードが表示されていない...私のプログラムで。

フラグメント活性である。フレームレイアウト内の線形レイアウトは利用できません実行している間だけUIデザインに見える**

+0

チェック(ビュー.GONE); (または)コードに間違いがあった場合は、デバッグして間違った箇所を見つけてください – YUVRAJ

+0

ボタンの高さを調整して、容器の大きさを大きくしないようにしてください。 – peter

答えて

1

ちょうどあなたのFrameLayoutLinearLayoutへの変更:あなたのコードのlayout.setVisibilityで

<LinearLayout 
    android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:id="@+id/containerView"> 
    ... 
+0

これは良い考えではありません。たぶん彼は 'FrameLayout'を使ってビューを表示したり隠したりします – peter

+0

素晴らしい..それは働きました...ありがとうございました.... –

関連する問題