0

私は、アプリ内での基本的なナビゲーションと考えられる私の主なアクティビティに対して次のConstraintLayoutを持っています。アンドロイドの正しい使い方:ConstraintLayout内の高さ

 <FrameLayout 
      android:id="@+id/fragment_container" 
      android:layout_width="0dp" 
      android:layout_height="0dp" 
      android:layout_marginBottom="0dp" 
      android:layout_marginTop="0dp" 
      android:background="@color/white" 
      app:layout_constraintBottom_toTopOf="@id/navigation" 
      app:layout_constraintLeft_toLeftOf="parent" 
      app:layout_constraintRight_toRightOf="parent" 
      app:layout_constraintTop_toTopOf="parent" /> 

     <android.support.design.widget.BottomNavigationView 
      android:id="@+id/navigation" 
      android:layout_width="0dp" 
      android:layout_height="wrap_content" 
      android:layout_marginEnd="0dp" 
      android:layout_marginStart="0dp" 
      android:background="?android:attr/windowBackground" 
      app:layout_constraintBottom_toBottomOf="parent" 
      app:layout_constraintLeft_toLeftOf="parent" 
      app:layout_constraintRight_toRightOf="parent" 
      app:menu="@menu/navigation" /> 

     <FrameLayout 
      android:id="@+id/fragment_container_top" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="@android:color/transparent" 
      app:layout_constraintLeft_toLeftOf="parent" 
      app:layout_constraintRight_toRightOf="parent" 
      app:layout_constraintBottom_toBottomOf="parent" 
      app:layout_constraintTop_toTopOf="parent" 
      android:elevation="8dp" 
      /> 


    </android.support.constraint.ConstraintLayout> 

BottomNavigationViewは、私は、対応するタブを切り替えたいときトップにstickt。

idがfragment_container_topの最後のFrameLayoutは、BottomNavigationViewを非表示にする必要があるフラグメントです。

これを達成するために、私はandroid:elevation="8dp"を設定しましたが、これは最もエレガントな選択肢ではありません。他にどのように私は同じ効果をアーカイブすることができますか?私はすべて私のアプリ内の私の外側の断片のFramelayoutが欲しい。

答えて

-2

強調表示されたオブジェクトを表示したいときに高度を使用します。影は影を定義します。 file:/// C:/Users/Urvish/Desktop/IlVvq.png

関連する問題