Spotted a bug? Have a great idea? Help us improve developer profiles! Submit feedback Google Developer Profile Send feedback Return to pathway One way to enable your app to trigger navigation from one fragment to the next is to use a LiveData value to indicate whether or not to trigger navigation. Assuming a LiveData value, called gotoBlueFragment, to trigger navigation from the red fragment to the blue fragment, which of the following is NOT part of a correct way of doing this? In the RedFragment, observe the gotoBlueFragment value. Implement the observe{} code to navigate to BlueFragment when appropriate, and then reset the value of gotoBlueFragment to indicate that navigation is complete. In the ViewModel, define the LiveData value gotoBlueFragment. Make sure your code defines an onClick handler for the View that the user clicks to navigate to BlueFragment, where the onClick handler observes the goToBlueFragment value. Make sure your code sets the gotoBlueFragment variable to the value that triggers navigation whenever the app needs to go from RedFragment to BlueFragment. How can you enable/disable a button based on a condition? Which one is true? In the layout file, set the android:enabled attribute of the button to 'Observable'. Track the state of the button view in the ViewModel. You can change whether a Button is enabled (clickable) or not by using LiveData. In the Fragment, add an observer to the enabled attribute of the button. Submit answers error_outline An error occurred when grading the quiz. Please try again.