question archive Open the file you saved from the Module Three assignment in Android Studio, then edit the MainActivity

Open the file you saved from the Module Three assignment in Android Studio, then edit the MainActivity

Subject:Computer SciencePrice:10.89 Bought3

Open the file you saved from the Module Three assignment in Android Studio, then edit the MainActivity.java file.

Specifically, you must address the following rubric criteria:

  • Create a function that displays a greeting. In  Android Studio, create a new public function named “SayHello()” that  returns a void. The function will need to accept a View as a parameter.  Within the function, ensure that it displays a message and check that  the contents of nameText are not null.
  • Create validation of the elements and inputs. To complete this task you must do all of the following: 
    • If the content of nameText is not null, write "Hello" and the contents of nameText to textGreeting.
    • If the content of nameText is null, write "You must enter a name" to textGreeting.
    • On activity_main.xml, set the “onClick of buttonSayHello” to “SayHello()”.
  • Dynamically enable and disable the button for appropriate situations. For buttonSayHello, the following pattern should be created: 
    • Dynamically disable buttonSayHello if there is no text in nameText.
    • Dynamically enable buttonSayHello when text is entered in nameText.

Option 1

Low Cost Option
Download this past answer in few clicks

10.89 USD

PURCHASE SOLUTION

Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

rated 5 stars

Purchased 3 times

Completion Status 100%

Related Questions