Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment, you will create a silly little counting app that uses a fragment to display UI elements. In addition to the start up

For this assignment, you will create a silly little counting app that uses a fragment to display UI elements. In addition to the start up activity, include a fragment that uses a layout to display a five Button widgets and an TextView widget.

  • The first Button should display the text "+1", and the string should live in the strings.xml resource file.
  • The second Button should display the text "+5", and the string should live in the strings.xml resource file.
  • The third Button should display "Reset", and the string should live in the strings.xml resource file.
  • The fourth Button should display -1, and the string should live in the strings.xml resource file.
  • The fifth Button should display -5, and the string should live in the strings.xml resource file.
  • The TextView widget should initially display "0".

Every time the user clicks the "+1" button, the number in your TextView widget should increase by 1. Every time the user clicks the "+5" button, the number in your TextView widget should increase by 5. Every time the user clicks the "Reset" button, the number in your TextView widget should be set to 0. Every time the user clicks the "-1" button, the number should decrease by 1. Every time the user clicks the "-5" button, the number should decrease by 5.

So, your app will have an Activity that manages a Fragment that uses it's own separate layout for the View widgets.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

5. To determine the financial benefits and costs of the program.

Answered: 1 week ago