Home > Mobile >  Why on the application cannot show?
Why on the application cannot show?

Time:10-05

Has set up a match opens at the parent but still nothing



CodePudding user response:

If code is coming, the layout in your activity or fragments loaded correctly?

CodePudding user response:

reference m - 1/f, oj response:
code is coming, whether the layout in your activity or fragments loaded correctly?



Is this main_activity

CodePudding user response:

The XML file
 & lt; ? The XML version="1.0" encoding="utf-8"?> 
XMLNS: app="http://schemas.android.com/apk/res-auto"
XMLNS: tools="http://schemas.android.com/tools"
The android: id="@ + id/container"
Android: layout_width="match_parent"
Android: layout_height="match_parent" & gt;

The android: id="@ + id/nav_view"
Android: layout_width="0 dp"
Android: layout_height="wrap_content"
Android: layout_marginStart="0 dp"
Android: layout_marginEnd="0 dp"
Android: background="? Android: attr/windowBackground
"App: layout_constraintBottom_toBottomOf="parent"
App: layout_constraintLeft_toLeftOf="parent"
App: layout_constraintRight_toRightOf="parent"
App: menu="@ menu/bottom_nav_menu"/& gt;

The android: id="@ + id/nav_host_fragment"
The android: name="androidx. Navigation. Fragments. NavHostFragment"
Android: layout_width="match_parent"
Android: layout_height="match_parent"
App: defaultNavHost="true"
App: layout_constraintBottom_toTopOf="@ id/nav_view"
App: layout_constraintEnd_toEndOf="parent"
App: layout_constraintLeft_toLeftOf="parent"
App: layout_constraintTop_toTopOf="parent"
App: layout_constraintVertical_bias="0.0"
App: navGraph="@ navigation/mobile_navigation"/& gt;


CodePudding user response:


Take a closer look at the layout control properties
  • Related