CEIS320 Lab 4 – Menu System and Images – With Screenshots – Perfect Solution – Instant Delivery

Lab Price = $18
Please feel free to send us your queries at: support@iqrajavaid.com
Payment methods

Add to Cart

Buy Now

View Cart


Problem Statement

Week 4: Lab Overview
TABLE OF CONTENTS

Lab 4: Menu System and Images (50 points)
Lab Overview
Scenario/Summary
In this lab, you will be working with different layouts and widgets to create a survey for a user. The survey will have spinners and will allow you to use Android data adapters to populate them. We will also explore some of the different layouts in Android. When you are finished creating your application, submit all of your open-source files.
Your project will include the following.
• Open-source .java files
• Zipped project file
Deliverables
• Completion of Steps 1–4
Grading Rubric Points
Completion of Steps 1–4 50 points
TOTAL 50 points

Required Software
This lab will use the following Lab Resources.
• Android Studio
Use a personal copy of the software or to access the Lab Resources, go to the Lab Resources section of the Course Resources page.
Lab Steps
Step 1: Menu System
To introduce our topics this week, please watch these two videos.
Android apps often contain menus that allow users to perform certain actions or customize settings. A menu is hidden until a user activates it, and the menu can have one or more items with additional functionality. We will be creating an options menu. Most navigation within a mobile app should actually be controlled by widgets that appear in the user interface rather than a menu bar. So we will create a main menu and an options menu.
In the three previous labs we used relative layout (you may have used constraint layout). We will discuss three more layouts available in Android. Linear layout is useful for creating a user interface that displays widgets in a vertical or horizontal line. A frame layout is a simple layout useful as a placeholder. A table layout is useful for displaying controls in a grid.
Open the IntroAndroidApp from last week. You can do this by opening Android Studio and Clicking File-> Open. You should see the AndroidStudioProjects folder. Your project should be in there. We will be adding a menu system to our app now.
The first step is to rename your MainActivity.java to WeatherActivity. Right-click on the MainActivity and choose Refactor -> Rename. Rename the java file to WeatherActivity.java. When you rename it, Android Studio automatically changes the name of the Java file and the name of the class.

Next, change the name (Refactor->Rename) for activity_main.xml and content_main.xml to activity_weather.xml and content_weather.xml.
Next, we are going to create our main menu screen. Right-click on the app module and choose New-> Activity->Basic Activity. Name it MainMenuActivity.

Add the following code to strings.xml. Note: Change Your Name in the first string to your name. If you add an apostrophe, you must escape it. For example: Welcome to Gina Cooper\’s App.
Welcome to Your Name App
Convert\nTemp
Tic Tac Toe
Info
Favorite\nSong
Take\nPicture
My\nDrawing
Edit the content_main_menu.xml. The main menu will contain a welcome message and then buttons for the user to access different pages. The buttons will be in a grid layout; previously we have used relative layout. You want three columns and two rows of buttons. The opening and closing of the grid layout is shown along with the first three buttons (the top row). Write the code in the text view to create the rest of the buttons. Note that the first row, first column is 0,0:.