Skip to content
Coding Fanatic
  • Android Development
  • News and Reviews
  • Road2Pro
  • Tutorials
  • Services
  • About

The Deed Is Done! 83 of 100 Days of…

  • October 15, 2020October 16, 2020
  • by Richard Clarke

I finished the last Activity of the Salesman’s Travel app!

You can find a video of this at the bottom of the page and a link to the source code here.

I finished updating the Search Activity. It now populates the ArrayList of addresses using data from the Realtime Database instead.

I added code for configuring the ArrayList containing the addresses, and displaying them using a ListView. The fun part was instantiating the Home objects like I did in a previous version of the app.

In the overridden onChildAdded method for the ChildEventListener, I initialized a String variable containing an element from the Realtime Database. I then instantiated a Home object using this String as the argument and added it to an ArrayAdapter. The ArrayAdapter would be used to configure the ArrayList.

It appears whatever is contained in the onChildAdded method will run iteratively for each element of the Realtime Database (click below).

In other words, with these changes, every element of the database is used to create an object which will be displayed in the app.

I’ve come a long way with this application. It started out as a Java coding challenge turned Android app. It’s not perfect, but it works as intended.

I learned a ton of new skills during my time with this project, and I have ideas for improvements. But it’s time to start something new. If anything, I can revisit this app at a later date.

Join the mailing list to see updates like this every week!
Coding Fanatic

Checkmark Image by PublicDomainPictures from Pixabay

Related

The List Is Up! 82 of 100 Days of Code
Salesman’s Travel Dev Thoughts 2.0 – 84 of 100 Days of Code
Richard Clarke
Richard is currently a developer using Java and Android Studio to build custom applications for Android. Richard tutored in mathematics at Montgomery College, and worked in Information Technology before entering the Software Development industry as a Quality Engineer.
100daysofcode Android AndroidDev database development Firebase Java Realtime Realtime Database software software development

Related articles

Your New Favorite Stopwatch App!…
Two for Two BABY! 7…
…But the App is for…
Play Store Blues – 5…
Top 4 Tips for Android…
No Dice – 3 of…

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • GitHub
  • YouTube
  • X
  • Instagram
  • LinkedIn
My Tweets

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • X
  • GitHub
  • LinkedIn
  • YouTube

Archives

Theme by Colorlib Powered by WordPress