Android Studio Water intake calculator As the title states I

Android Studio: Water intake calculator.

As the title states, I need a working water intake calculator for use in Android Studio. For more specific details, I would like it set up in a specific way:

User will be prompted to select how many glasses of water they drank today. They do so based on the interface. Based on a normal Android phone screen, the top of the screen will state \"Type how many glasses of water you drank today.\"

The user will click on the area with an underline for the numberpad/keyboard to appear on the screen.

They then type their amount (be it 1, 2, 3, 8, or even 300!) and click enter (if no enter key can be shown, they click elsewhere on the interface to remove the numpad/keyboard. If this method is done, a computation method in which an answer is immediately calculated after a number is pressed must be done).

A message below the user will then be granted based on the user\'s typed information.

If the user enters in less than 8: \"The average amount of water intake is 8 glasses. Try to hydrate more tomorrow!\"

If the user enters in exactly 8: \"You consumed the average water amount needed per day. Keep it up!\"

If the user enters more than 8: \"Not only are your water intake levels in check, they surpass the recommended amount. Keep doing what you\'re doing!\"

If the user does not enter a number/incorrect character (such as \"$\" or \"a\"): \"Sorry, but you have to type a number.\"

Within all four cases, the resulting output should state the amount of glasses the user entered, and then state the message after. For instance, if I entered 8 in the text field, the output result would be: \"8 glasses. Not only are your water intake levels in check, they surpass the recommended amount. Keep doing what you\'re doing!\"

At the moment, that is all that is required. I hope my description is detailed enough to become a working water intake calculator.

Solution

Create a new android studio project and paste the following files.

MainActivity.java

activity_main.xml

Android Studio: Water intake calculator. As the title states, I need a working water intake calculator for use in Android Studio. For more specific details, I w

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site