55.2 Modifying the Basic Activity Project
Since the Basic Activity was selected, the layout includes a floating action button which is not required for this project. Load the activity_main.xml layout file into the Layout Editor tool, select the floating action button and tap the keyboard delete key to remove the object from the layout. Edit the MainActivity.kt file and remove the floating action button and navigation controller code from the onCreate method as follows:
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
setSupportActionBar(binding.toolbar)
}
Also, remove the onSupportNavigateUp() method, then open the content_main.xml file and delete the nav_host_fragment_content_main object from the layout so that only the ConstraintLayout...