CST2335 Lab 8 CST2335 Lab 8 This assignment relates to the following Course Learning Requirements: · CLR 1: Write a graphical user interface-based program, given design documents. Techniques used will...

1 answer below »
attached the assignment


CST2335 Lab 8 CST2335 Lab 8 This assignment relates to the following Course Learning Requirements: · CLR 1: Write a graphical user interface-based program, given design documents. Techniques used will be object-oriented programming, structured programming, top-down coding, and event-driven coding. · CLR 4: Debug program problems using manual and programmatic methods. · CLR 7: Create GUI programs that support internationalization as well as sustainability. Objective of this Assignment: The following is an exercise to help you implement what you have learned in the module. It will allow you to familiarize yourself with the module content as well as practice the skills required to develop software in the Android Studio. The goal of this lab is become familiar with Toolbars and Dialogs in Android. Toolbars are areas that appear at the top of the screen that are like menus. You will learn how to customize the messages and appearance of the toolbar items. Pre-Assignment Instructions: 1. Review the Module 8 and Module 9 content in Brightspace. Assignment Tasks: 1. Create a new branch in Git. Start by selecting the “Git” menu in Android Studio and select “Branches”. In the resulting dialog click “New branch” and call it “lab_8”. 2. Delete any activities created in previous labs and create a new MainActivity starting from an empty activity. Your MainActivity will also need to implement “NavigationView.OnNavigationItemSelectedListener” to run the Navigation Drawer. You’ll need to have override methods for “onCreate”, “onNavigationItemSelected”, “onOptionsItemSelected“, and “onCreateOptionsMenu”. 3. Update theme.xml with these two lines in order to manipulate and display the Toolbar correctly:falsetrue 4. Create 2 menu items that show up as icons in the toolbar, and one item that shows up in the overflow menu as text. Make sure to use “app:showAsAction” to either force or hidden them in the ActionBar. 5. For the 2 icon items, the ids should be unique for each menu item. Put unique titles for each menu item as well (Choice 1, Choice 2, etc). For the icon, download some icon PNG graphics from: https://icons8.com/icons/ and copy them into the “res/drawable” folder in Android Studio. In the XML, you don’t need to add the “.png” file ending. The orderInCategory is a number for sorting the icons from smallest to largest. If you want your icon to be on the left side, give it the lowest number. 6. For the icon menu items, clicking item 1 should show a toast saying, “You clicked on item 1”. Clicking on item 2 should say “You clicked on item 2”.  7. Create a new empty activity called “DadJoke” and display your best dad joke in a TextView. Note that you should have your Toolbar and NavigationDrawer on both activities. You can accomplish this by having both activities extend some base activity where the toolbar/navigation drawer are defined to reduce code duplication. 8. Add a NavigationDrawer that has the following items: a. Home – Brings you to the MainActivity if you aren’t already on it. b. Dad Joke – Brings you to the DadJoke activity if you aren’t already on it. c. Exit – Calls “finishAffinity();” to close all open activities and exit. 9. Commit your work with Git, using the commit message “Finished lab 8”, and push the code to GitHub. Here’s a full recording of how the app should function: Rubric Criteria Points The app compiles and runs without crashing 2 Toolbar appears with two icons 2 Selecting items in the toolbar show the correct message on a Toast 2 User can open a NavigationDrawer 2 Selecting items in the NavigationDrawer take you to the proper activity 2 Total 10
Answered Same DayMar 07, 2022

Answer To: CST2335 Lab 8 CST2335 Lab 8 This assignment relates to the following Course Learning Requirements: ·...

Gaurav answered on Mar 07 2022
111 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here