Question
Continue from the last project built, now we need to create categories for the apps. For such purpose, we will retain the sentence (textview) and
Continue from the last project built, now we need to create categories for the apps. For such purpose, we will retain the sentence (textview) and delete sentence (button) features from the last project. However, we need to add codes to change the last project, use the same XML and Java files from below:
Reference: https://www.chegg.com/homework-help/questions-and-answers/build-sentence-via-android-studio-apk-51-lollipop-download-latest-sdk-packages-instruction-q29786257
Step 1: Although it's not shown, the delete sentence is still on the right on the sentence.
Below the sentence (textview) has two grid layouts, the top grid layout contains words I, want, to, eat, drink, clicking on them will generate words. The bottom grid layout stays are categories, clicking on them will not generate words on the sentence (textview). Instead, they will open up a category of elements.
Step 2: Click on I, then want, then to, then eat, which generates a sentence, I want to eat.
Step 3: After making the sentence "I want to eat", click on the food category on the bottom grid layout.
The original bottom grid layout is replaced by a grid layout containing elements of food: pasta and pizza. There is also a back button which allows the user to get back to the original bottom grid layout, which contains two categories: food and drink.
Click on the pasta element on the new bottom grid layout will complete the sentence: I want to eat pasta.
Alternative Sentence: I want to drink milk.
Follow step 1 and step 2, but change the words:
Clicking on the drink button will open a new bottom grid layout, which contains the back button, water, and milk.
Bonus feature (You can skip if you want): Orientation: Refer to the question below, all instructions are there.
https://www.chegg.com/homework-help/questions-and-answers/android-studio-orientation-lock-via-manifest-file-1-java-file-2-xml-files-represents-table-q29913354
Create two types of layouts, one for tablets, one for phones. Lock tablet devices to landscape orientation only, while lock phone devices to portrait orientations only. I heard changing codes on Manifest file is one of the solutions. Please try anything necessary.
Requirement (MUST READ):
1. If possible, do not create an additional Java file, you may create additional XML file that links the same Java file.
2. Post both codes from Java file and XML file(s) (in case if there's more than 1 XML file) when complete.
3. Bonus: Post codes on manifest if you change layout orientations for phones/tablets on Manifest.
textview, generates sentence want to eat drink -grid layout #1 main words fooddrink -grid layout #2 categories textview, generates sentence want to eat drink -grid layout #1 main words fooddrink -grid layout #2 categoriesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started