Shorr H Android Development 2025-26-Period 3 Assignments
- Instructor
- Mr. Garrett Shorr
- Term
- 2025-2026 School Year
- Department
- Mathematics
- Description
-
Upcoming Assignments
No upcoming assignments.
Past Assignments
Due:
Again, before you write a single line of code:
Finish the prior project planning assignment
Have one person create a github repository (by creating a new project in Android Studio and doing Share on Github)
Add access to all group members
Other group members when opening the project for the first time should click get from vcs, select github, and choose the repository to clone. After it's been opened once on a computer, you just use the recent project menu to open it in the future.
Create a project planning board "from scratch" while selecting board in that repository
Come up with a few user stories to help drive your work for the next 2 weeks
Break up a user story into smaller tasks that you can start with and assign to group members
Share a screenshot of your planning board. Note who your group members are. One per group should submit.
User Stories Video: https://www.youtube.com/watch?v=Fw98L-kcRpc
Finish the prior project planning assignment
Have one person create a github repository (by creating a new project in Android Studio and doing Share on Github)
Add access to all group members
Other group members when opening the project for the first time should click get from vcs, select github, and choose the repository to clone. After it's been opened once on a computer, you just use the recent project menu to open it in the future.
Create a project planning board "from scratch" while selecting board in that repository
Come up with a few user stories to help drive your work for the next 2 weeks
Break up a user story into smaller tasks that you can start with and assign to group members
Share a screenshot of your planning board. Note who your group members are. One per group should submit.
User Stories Video: https://www.youtube.com/watch?v=Fw98L-kcRpc
Due:
Finish this before starting to code your app.
1. Group members (solo is okay)
2. Purpose of the app
3. Features of the app
4. Sketches/Design of the app
Sketches can be done on paper, in whatever paint program you choose, or using Figma.
Figma Material Design link to get copies of the various design kits: https://www.figma.com/@materialdesign
You can make your own project and have the design kit open in another tab. You can then copy and paste between the two tabs.
One per group should submit.
1. Group members (solo is okay)
2. Purpose of the app
3. Features of the app
4. Sketches/Design of the app
Sketches can be done on paper, in whatever paint program you choose, or using Figma.
Figma Material Design link to get copies of the various design kits: https://www.figma.com/@materialdesign
You can make your own project and have the design kit open in another tab. You can then copy and paste between the two tabs.
One per group should submit.
Due:
1. Come up with at least 3 categories or topics that you like or are interested in. My 3 would be politics, rock climbing, board games.
2. For each category, come up with at least 3 problems you'd like to solve with an app. It could be something like "I want to track which board games I've played" or "I hate having to google the phone number for my representatives because I'm too lazy to just put them in my contacts"
3. For each category, go to either the apple or android app store (feel free to use your phones for this or use the web interfaces, either way) and look for apps related to your topic that ideally address some or all of the problems you wanted to solve. Try to find 2 apps for each topic.
4. For each of the apps:
What are the primary featuers?
What do user reviews say is good?
What do user reviews say is bad?
Does it address any of your problems?
5. Based on what you saw in those apps, come up with some ideas of what you'd like to do for an app for the final project. List out the features you want the app to have and sketch out what the screens would look like (on paper or google drawings).
2. For each category, come up with at least 3 problems you'd like to solve with an app. It could be something like "I want to track which board games I've played" or "I hate having to google the phone number for my representatives because I'm too lazy to just put them in my contacts"
3. For each category, go to either the apple or android app store (feel free to use your phones for this or use the web interfaces, either way) and look for apps related to your topic that ideally address some or all of the problems you wanted to solve. Try to find 2 apps for each topic.
4. For each of the apps:
What are the primary featuers?
What do user reviews say is good?
What do user reviews say is bad?
Does it address any of your problems?
5. Based on what you saw in those apps, come up with some ideas of what you'd like to do for an app for the final project. List out the features you want the app to have and sketch out what the screens would look like (on paper or google drawings).
Due:
I'm setting the due date for the world that I want, perhaps not the world that we have. Let's try our best to finish this on Friday. If enough people need more time, we can maybe have another day on Wednesday when we get back.
Requirements:
Logging in and registering new users both work.
All CRUD operations work.
Part A: The video
Using Quicktime Screen Capture, make an mp4 showing all 4 CRUD functions in your app.
1. Start the recording
2. Log into backendless in your browser and navigate to the User table
3. Register a new user in your app. Show that the User table has updated. You might need to refresh the browser.
4. Put your emulator over that window so that the ownerId column of the Session table is visible along with one of the values you can change in the SessionDetailActivity (I was able to see the name of the session, but your order may differ).
5. Login to your app using a credential that has existing rows in the SessionEntry table so that you have the SessionListActivity showing. This demonstrates the Read functionality.
6. Demo Create: click the floating action button to bring up the detail activity with a new object. Save immediately. The backendless table in the background should update with the new item.
7. Demo Delete: Long click the item you just created in your list activity and click the delete option. The backendless table in the background should update removing that item.
8. Demo Update: click any Session item that already exists. Change the value that is visible near the ownerId (mine was name). Click the save button. The backendless table in the background should update changing that value.
9. Stop the recording.
10. Save the recording.
11. Upload your video here.
A demo video is attached.
Part B: The code
Using the same settings as prior submissions, save the following files into a pdf by using the print menu item in Android Studio:
SessionListActivity
SessionAdapter
SessionDetailActivity
Requirements:
Logging in and registering new users both work.
All CRUD operations work.
Part A: The video
Using Quicktime Screen Capture, make an mp4 showing all 4 CRUD functions in your app.
1. Start the recording
2. Log into backendless in your browser and navigate to the User table
3. Register a new user in your app. Show that the User table has updated. You might need to refresh the browser.
4. Put your emulator over that window so that the ownerId column of the Session table is visible along with one of the values you can change in the SessionDetailActivity (I was able to see the name of the session, but your order may differ).
5. Login to your app using a credential that has existing rows in the SessionEntry table so that you have the SessionListActivity showing. This demonstrates the Read functionality.
6. Demo Create: click the floating action button to bring up the detail activity with a new object. Save immediately. The backendless table in the background should update with the new item.
7. Demo Delete: Long click the item you just created in your list activity and click the delete option. The backendless table in the background should update removing that item.
8. Demo Update: click any Session item that already exists. Change the value that is visible near the ownerId (mine was name). Click the save button. The backendless table in the background should update changing that value.
9. Stop the recording.
10. Save the recording.
11. Upload your video here.
A demo video is attached.
Part B: The code
Using the same settings as prior submissions, save the following files into a pdf by using the print menu item in Android Studio:
SessionListActivity
SessionAdapter
SessionDetailActivity
Due:
Due Thu 3/12
1. Print the following files to a pdf:
Your Activities
Your Model/Data Classes
Your Adapter(s) if you have any
Your Layouts (activity layouts and any recyclerview item layouts)
Your menus (if you have any)
Print using the following settings:
JetBrains Mono font size 8
Margins of 0.25 all around
Color Printing
Save as a pdf (you can open in preview first to see that the settings were correct, but then you'll have to open the print dialog again from within preview and save as pdf from there)
2. Record a movie of your app working using Quicktime's screen record function. Submit that as well.
1. Print the following files to a pdf:
Your Activities
Your Model/Data Classes
Your Adapter(s) if you have any
Your Layouts (activity layouts and any recyclerview item layouts)
Your menus (if you have any)
Print using the following settings:
JetBrains Mono font size 8
Margins of 0.25 all around
Color Printing
Save as a pdf (you can open in preview first to see that the settings were correct, but then you'll have to open the print dialog again from within preview and save as pdf from there)
2. Record a movie of your app working using Quicktime's screen record function. Submit that as well.
Due:
1. Browse the lists of apis:
Big list: https://github.com/public-apis/public-apis
Another list with some repeats: See attached file
Yet another list with some repeats: https://mixedanalytics.com/blog/list-actually-free-open-no-auth-needed-apis/
2. Test your desired api endpoint and make sure you can actually retrieve a JSON file with the desired data. If you can't get that to work, go back to step 1.
(For more complex APIs that require a key in the header for instance, we can use postman. Talk to me and we can set it up: https://www.postman.com/)
3. Come up with a data class for your API. Use any method you have learned to do that.
4. Submit the following in a google doc:
a a brief plan of what you want to do with the project (how you plan to present/display the data)
b. the URL of your API documentation
c. the URL of the API endpoint you are using
d. a sample of the JSON that endpoint returns
e. your kotlin data class(es)
DO NOT START WORK ON OTHER ASPECTS OF THE PROJECT UNTIL YOU HAVE THIS DONE
ONCE COMPLETE, THE FIRST THING TO WORK ON IN YOUR PROJECT IS THE RETROFIT CALL. MAKE SURE YOU CAN GET THE DATA BEFORE YOU DO ANYTHING ELSE.
Big list: https://github.com/public-apis/public-apis
Another list with some repeats: See attached file
Yet another list with some repeats: https://mixedanalytics.com/blog/list-actually-free-open-no-auth-needed-apis/
2. Test your desired api endpoint and make sure you can actually retrieve a JSON file with the desired data. If you can't get that to work, go back to step 1.
(For more complex APIs that require a key in the header for instance, we can use postman. Talk to me and we can set it up: https://www.postman.com/)
3. Come up with a data class for your API. Use any method you have learned to do that.
4. Submit the following in a google doc:
a a brief plan of what you want to do with the project (how you plan to present/display the data)
b. the URL of your API documentation
c. the URL of the API endpoint you are using
d. a sample of the JSON that endpoint returns
e. your kotlin data class(es)
DO NOT START WORK ON OTHER ASPECTS OF THE PROJECT UNTIL YOU HAVE THIS DONE
ONCE COMPLETE, THE FIRST THING TO WORK ON IN YOUR PROJECT IS THE RETROFIT CALL. MAKE SURE YOU CAN GET THE DATA BEFORE YOU DO ANYTHING ELSE.
Due:
Checklist:
* API call works and you can access the count and title of the request along with the magnitude, title, place, time, url, and coordinates of each earthquake.
* The recyclerView works and displays the magnitude, place, and time for each earthquake
* The recyclerView filters out all earthquakes below 1.0. (recall dogs.filter { it.breed == "golden" } would return a list where only the breed of an individual dog object matches "golden")
* The recyclerView has changed the colors of magnitude to match the severity of the earthquake.
* The recyclerView has added the appropriately colored warning icon attached to the magnitude textview for earthquakes that are large or significant.
* the menu has options to sort by recent and sort by magnitude level descending (then by recent) in the options 3 vertical dots section.
* magnitude should only display 1 decimal point (Use any method you want to accomplish this. Some options include something like DecimalFormat, NumberFormatter (google it), but there are some workarounds using things you learned in AP Comp Sci)
* There is also a clickable item in the menu to show the dialog giving a brief legend of what the different colors mean.
* clicking on an item will take you to the EarthquakeMapActivity, transferring the the entire parcelable Earthquake object through with the intent (you may have called the object Feature. That's fine.).
* the map has a marker placed at the location of the earthquake. the map should be centered on the marker and zoomed out enough to see roughly where in the world it is.
* clicking on the marker brings up additional earthquake details in the marker's popup
* the earthquake magnitude level colors are added as constants to the colors.xml file in the res/values folder
1. Take a screenshot of the list in default most recent order.
2. Take a screenshot of the list sorted by magnitude level first, then most recent second.
3. Take a screenshot of the marker popup.
4. Print the following files to PDF:
EarthquakeAdapter
EarthquakeListActivity
EarthquakeMapActivity
EarthquakeService
RetrofitHelper
All your model classes
colors.xml
menu_earthquake_data.xml (or whatever you called the menu in the EarthquakeListActivity)
activity_earthquake_list.xml
activity_earthquake_map.xml
item_earthquake.xml (or whatever you called the layout that the recyclerview uses)
4. Add the screenshots to the pdf using preview.
* API call works and you can access the count and title of the request along with the magnitude, title, place, time, url, and coordinates of each earthquake.
* The recyclerView works and displays the magnitude, place, and time for each earthquake
* The recyclerView filters out all earthquakes below 1.0. (recall dogs.filter { it.breed == "golden" } would return a list where only the breed of an individual dog object matches "golden")
* The recyclerView has changed the colors of magnitude to match the severity of the earthquake.
* The recyclerView has added the appropriately colored warning icon attached to the magnitude textview for earthquakes that are large or significant.
* the menu has options to sort by recent and sort by magnitude level descending (then by recent) in the options 3 vertical dots section.
* magnitude should only display 1 decimal point (Use any method you want to accomplish this. Some options include something like DecimalFormat, NumberFormatter (google it), but there are some workarounds using things you learned in AP Comp Sci)
* There is also a clickable item in the menu to show the dialog giving a brief legend of what the different colors mean.
* clicking on an item will take you to the EarthquakeMapActivity, transferring the the entire parcelable Earthquake object through with the intent (you may have called the object Feature. That's fine.).
* the map has a marker placed at the location of the earthquake. the map should be centered on the marker and zoomed out enough to see roughly where in the world it is.
* clicking on the marker brings up additional earthquake details in the marker's popup
* the earthquake magnitude level colors are added as constants to the colors.xml file in the res/values folder
1. Take a screenshot of the list in default most recent order.
2. Take a screenshot of the list sorted by magnitude level first, then most recent second.
3. Take a screenshot of the marker popup.
4. Print the following files to PDF:
EarthquakeAdapter
EarthquakeListActivity
EarthquakeMapActivity
EarthquakeService
RetrofitHelper
All your model classes
colors.xml
menu_earthquake_data.xml (or whatever you called the menu in the EarthquakeListActivity)
activity_earthquake_list.xml
activity_earthquake_map.xml
item_earthquake.xml (or whatever you called the layout that the recyclerview uses)
4. Add the screenshots to the pdf using preview.
Due:
1. Add one more menu item to sort by description length (shortest description to longest)
2. Take a screenshot of the list activity with the options menu open
(click on the options menu, then cmd+shift+4 to screenshot)
3. Take a screenshot of the detail activity (pick any hero you want)
4. Print the Hero, HeroAdapter, HeroDetailActivity, HeroListActivity, activity_hero_detail.xml, activity_hero_list.xml, item_hero.xml,
herolist_menu.xml and save as pdf. Remember to make the font size 8 and the margins 0.25inches.
5. Upload all those things to the submission assignment
Checklist before submitting:
Recyclerview and detail activity both work
Hero class is made parcelable and comparable
Adapter passes the single Hero object to the Detail Activity
Menu works with 3 sort options (rank, name, description length)
2. Take a screenshot of the list activity with the options menu open
(click on the options menu, then cmd+shift+4 to screenshot)
3. Take a screenshot of the detail activity (pick any hero you want)
4. Print the Hero, HeroAdapter, HeroDetailActivity, HeroListActivity, activity_hero_detail.xml, activity_hero_list.xml, item_hero.xml,
herolist_menu.xml and save as pdf. Remember to make the font size 8 and the margins 0.25inches.
5. Upload all those things to the submission assignment
Checklist before submitting:
Recyclerview and detail activity both work
Hero class is made parcelable and comparable
Adapter passes the single Hero object to the Detail Activity
Menu works with 3 sort options (rank, name, description length)
Due:
You will take notes on it as well as record your participation there (answer prompts, code, etc)
Being on your phone, playing games on the computer, doing other work, or otherwise being distracted will negatively impact your grade.
Being on your phone, playing games on the computer, doing other work, or otherwise being distracted will negatively impact your grade.
Due:
Print the following files:
RegistrationUtil.kt
RegistrationUtilTest.kt
LoginActivity.kt
RegistrationActivity.kt
In addition to having all of the intents and utility class functions working, make sure that you have in your Unit Test Class:
// Make tests for failures of
// min length of 8 chars
// at least one digit (make sure it's at least 8 and has a capital letter)
// at least on capital letter
// Make a test for good matching passwords working
// Make the tests for the other functions in the Util class with
// the common failures and 1 success for each
Submit those as a pdf. Remember to use the font size 8 and 0.25" margins. See attached images.
RegistrationUtil.kt
RegistrationUtilTest.kt
LoginActivity.kt
RegistrationActivity.kt
In addition to having all of the intents and utility class functions working, make sure that you have in your Unit Test Class:
// Make tests for failures of
// min length of 8 chars
// at least one digit (make sure it's at least 8 and has a capital letter)
// at least on capital letter
// Make a test for good matching passwords working
// Make the tests for the other functions in the Util class with
// the common failures and 1 success for each
Submit those as a pdf. Remember to use the font size 8 and 0.25" margins. See attached images.
Due:
Paste whatever you have into a google doc and submit it. RegistrationUtil.kt and the Unit test file.
Due:
Requirements:
View Binding is enabled and you are using the binding notation when referencing widgets. Example:
binding.buttonMainSong.setOnClicklistener { }
noteMap is implemented
playSong is a suspend function
a coroutine is used to launch the playSong function
Max Value: 85% with no challenge completed (note challenge must be your original work. plagiarism is plagiarism even outside of English & Social Studies classes).
Max Value 100% with a challenge completed.
Submit the following:
A pdf of your MainActivity.kt and activity_main.xml done through the print menu item. If you added your own songs via json, include those as well.
View Binding is enabled and you are using the binding notation when referencing widgets. Example:
binding.buttonMainSong.setOnClicklistener { }
noteMap is implemented
playSong is a suspend function
a coroutine is used to launch the playSong function
Max Value: 85% with no challenge completed (note challenge must be your original work. plagiarism is plagiarism even outside of English & Social Studies classes).
Max Value 100% with a challenge completed.
Submit the following:
A pdf of your MainActivity.kt and activity_main.xml done through the print menu item. If you added your own songs via json, include those as well.
Due:
Download and unzip the SoundboardStarter project and open it in Android Studio. Follow along with the questions in the google doc and answer them in a different color.
I've attached a zip with sounds for a full piano, if you want more than the 2 octaves I've provided. They are listed by key number and you'll have to figure out which key number matches up with each note.
The only thing that is due is the 4 questions.
I've attached a zip with sounds for a full piano, if you want more than the 2 octaves I've provided. They are listed by key number and you'll have to figure out which key number matches up with each note.
The only thing that is due is the 4 questions.
Due:
Due Thursday
1. Screenshot of the activity_main.xml layout (with special instructions, see below & video)
Design & Blueprint turned on
Show all constraints turned on
2. print to pdf the activity_main.xml
Combine both into one file.
1. Screenshot of the activity_main.xml layout (with special instructions, see below & video)
Design & Blueprint turned on
Show all constraints turned on
2. print to pdf the activity_main.xml
Combine both into one file.
Due:
Tentatively Due End of Class Monday.
Submission Checklist:
Quiz works and completes without crashing
Score is calculated correctly
Changing the phone language to your chosen second language fully translates the entire app to that language
No hardcoded strings--all strings are in strings.xml
All quiz logic is handled by the Quiz class (i.e. things like score variables are stored in the Quiz class and not the MainActivity)
The program will not crash or otherwise fail to act correctly if it is fed json with different numbers of questions in the appropriate format
Quiz & Question classes have no knowledge of Android-specific functions
Print the following files to a pdf:
MainActivity.kt
Quiz.kt
Question.kt
activity_main.xml
both question.json files
both strings.xml files
Print using the following settings:
JetBrains Mono font size 8
Margins of 0.25 all around
Color Printing
Save as a pdf. Open the pdf and verify it has all the files in it before submitting.
Submission Checklist:
Quiz works and completes without crashing
Score is calculated correctly
Changing the phone language to your chosen second language fully translates the entire app to that language
No hardcoded strings--all strings are in strings.xml
All quiz logic is handled by the Quiz class (i.e. things like score variables are stored in the Quiz class and not the MainActivity)
The program will not crash or otherwise fail to act correctly if it is fed json with different numbers of questions in the appropriate format
Quiz & Question classes have no knowledge of Android-specific functions
Print the following files to a pdf:
MainActivity.kt
Quiz.kt
Question.kt
activity_main.xml
both question.json files
both strings.xml files
Print using the following settings:
JetBrains Mono font size 8
Margins of 0.25 all around
Color Printing
Save as a pdf. Open the pdf and verify it has all the files in it before submitting.
Due:
One thing programmers often do is learn by reading through tutorials. Use the various resources provided in the document to find the answers to the questions and use a different color when answering.
You can work in groups but each turn in an individual document.
You can work in groups but each turn in an individual document.
Due:
Due sometime Friday
1. Start/Stop works & doesn't skip time
2. Maintain state through orientation change
3. Reset should set the time to 0. It's up to you whether or not you keep it running if it were running when clicking reset.
*if it were running, stay running & not skip time
*if it were stopped, stay stopped & not skip time
having a rounding error of 1 second is okay.
To turn this in, we'll use Quicktime screen record to record a movie of the following:
Start
Wait 3 seconds
Stop
Wait 3 seconds
Start
Wait 3 seconds
Stop
Rotate
Wait 3 seconds
Start
Rotate
Wait 3 seconds
Stop
Reset
Start
Wait 3 seconds
Reset
1. Start/Stop works & doesn't skip time
2. Maintain state through orientation change
3. Reset should set the time to 0. It's up to you whether or not you keep it running if it were running when clicking reset.
*if it were running, stay running & not skip time
*if it were stopped, stay stopped & not skip time
having a rounding error of 1 second is okay.
To turn this in, we'll use Quicktime screen record to record a movie of the following:
Start
Wait 3 seconds
Stop
Wait 3 seconds
Start
Wait 3 seconds
Stop
Rotate
Wait 3 seconds
Start
Rotate
Wait 3 seconds
Stop
Reset
Start
Wait 3 seconds
Reset
Due:
Due Wednesday
The bolded sections of the attached document have things for you to write and complete. The non-bolded sections have instructions for you to follow but don't need to have written answers for.
Complete the sections in a different font color so it's easy to see your work inline.
In the video: intro to the stopwatch app, how to use XML and add a chronometer widget, how to override a function through autocomplete, how to make a static constant in kotlin through a companion object.
1. Open the project that we set up github with "Stopwatch".
2. Add Chronometer widget to activity_main.xml through the code view
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/chronometer_main_stopwatch"/>
and constraint it in the design view. You can also change the text size to something like 64sp so you can see it more easily.
The bolded sections of the attached document have things for you to write and complete. The non-bolded sections have instructions for you to follow but don't need to have written answers for.
Complete the sections in a different font color so it's easy to see your work inline.
In the video: intro to the stopwatch app, how to use XML and add a chronometer widget, how to override a function through autocomplete, how to make a static constant in kotlin through a companion object.
1. Open the project that we set up github with "Stopwatch".
2. Add Chronometer widget to activity_main.xml through the code view
android:layout_height="wrap_content"
android:id="@+id/chronometer_main_stopwatch"/>
and constraint it in the design view. You can also change the text size to something like 64sp so you can see it more easily.
Due:
Use a different color font to answer the questions directly inline with your copy of the document. We'll have 20 minutes at the start of class on Monday.
For the project itself, these are the features:
Self Destruct Button: Launch a CountDownTimer, change the text on the button with a countdown from 10 to 1 or 0. End the activity upon reaching the end.
Stretch goal: Make the layout blink red, increasingly faster as the timer gets closer to 0. Disable the button after it is pressed.
Useless switch: Turn it on and it automatically turns off x seconds later.
Stretch goal: Randomize the timer. Cancel the timer if it is turned off before the timer is finished.
Look Busy: Hide the regular UI, show the progress bar and the textview
Return the regular UI after the progress bar has finished filling.
For the project itself, these are the features:
Self Destruct Button: Launch a CountDownTimer, change the text on the button with a countdown from 10 to 1 or 0. End the activity upon reaching the end.
Stretch goal: Make the layout blink red, increasingly faster as the timer gets closer to 0. Disable the button after it is pressed.
Useless switch: Turn it on and it automatically turns off x seconds later.
Stretch goal: Randomize the timer. Cancel the timer if it is turned off before the timer is finished.
Look Busy: Hide the regular UI, show the progress bar and the textview
Return the regular UI after the progress bar has finished filling.
Due:
In a google doc, answer the following questions.
Compare your code to the code I've provided and answer the following questions:
1. Do you notice anything different about the content of the onClickListeners?
2. In the code provided, what do you notice about the organization of all the findViewById method calls?
3. In the code provided, where do you notice the logic is for comparing numbers and keeping score?
4. What advantages might there be for separating the game logic from the UI logic?
5. Paste your code from your MainActivity at the bottom.
The kotlin files: https://gist.github.com/gshorrSPHS/8ef08ec44462024540e6d7364ff803ea
Compare your code to the code I've provided and answer the following questions:
1. Do you notice anything different about the content of the onClickListeners?
2. In the code provided, what do you notice about the organization of all the findViewById method calls?
3. In the code provided, where do you notice the logic is for comparing numbers and keeping score?
4. What advantages might there be for separating the game logic from the UI logic?
5. Paste your code from your MainActivity at the bottom.
The kotlin files: https://gist.github.com/gshorrSPHS/8ef08ec44462024540e6d7364ff803ea
Due:
Submit answers in the attached google doc below. (explanation is at the end of the video)
Due:
Please return the signed syllabus by Tuesday, 8/19.
Due:
Complete the attached survey and mark this assignment complete when you are done.
Due:
What are 5 differences that you see in the Main Activity between Kotlin and Java?
Kotlin Code:
package com.example.buttonclicker
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
------
Kotlin vs Java
1. No semicolons
2. no public in the header. public is the default visibility for classes and functions
3. parameter order: varName: DataType
4. Datatype Bundle? vs Bundle ? means could be null
5. no void for return type in kotlin. if you don't specify a return type in kotlin, it is by default Unit (kotlin equivalent to void)
6. When making a subclass or using an interface, kotlin uses : instead of extends/implements
7. fun is the keyword to say you have function
8. override is now mandatory if you want to override a function from the superclass
Kotlin Code:
package com.example.buttonclicker
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
------
Kotlin vs Java
1. No semicolons
2. no public in the header. public is the default visibility for classes and functions
3. parameter order: varName: DataType
4. Datatype Bundle? vs Bundle ? means could be null
5. no void for return type in kotlin. if you don't specify a return type in kotlin, it is by default Unit (kotlin equivalent to void)
6. When making a subclass or using an interface, kotlin uses : instead of extends/implements
7. fun is the keyword to say you have function
8. override is now mandatory if you want to override a function from the superclass