I have a problem with a layout that I'm developing, this is my activity for client registration and I only have a BottomNavigationView, and a LinearLayout that I'll replace with a
-
<LinearLayout android:id="@+id/fragment_trocar" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.BottomNavigationView android:id="@+id/bottomNavigatintoonCadastroCliente" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:background="@drawable/custom_button_line" android:elevation="8dp" app:itemIconTint="@color/colorBlack" app:itemTextColor="@color/colorBlack" app:menu="@menu/menu_bottom_cadastro_cliente" /> </LinearLayout>
-
FragmentCadastroCustomer
-
CadastroClienteActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_cadastro_cliente); FragmentManager fragmentManager = getFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.replace(R.id.fragment_trocar, new CadastroClienteFragment()); fragmentTransaction.commit(); } public void iniciarComponentes() { bottomNavigatintoonCadastroCliente = (BottomNavigationView) findViewById(R.id.bottomNavigatintoonCadastroCliente); }
}
What do I need to do to fix my Layout to show up my BottomNavigationView at the bottom of the screen?