Android Studio how to make mainactivity as home fragment? : I have a mainactivity and other fragments which open a webview when user clicks on them on navigationviewer. I added Home fragment to navigation view but I don't know how to make it default so that if user opens the app, default home fragment opens up. Do I have to make another java class or use MainActivity.java as home? If yes, how do I use MainActivity.java as home fragment? And if user clicks other fragment to open a webview and presses the backbutton, how to make it go back to the default home fragment? At the moment, if I press the backbutton, it literally destroys app and goes back to Phone background.