简体   繁体   中英

Fragment showing nothing when starting my app for first time

I have an app with bottom navigation fragment activity I have placed text views and buttons on my home fragment. further these fragments are placed in a frame layout. when I launch my app my home fragment shows nothing just blank screen it loads everything when I switch between fragments.

because you didn't specify the first fragment to show,

 bottomNavigation.getMenu().findItem(R.id.item).setChecked(true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM