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

I Did It to Myself, 78 of 100 Days…

  • September 10, 2020September 11, 2020
  • by Richard Clarke

I tripped myself up. I am the architect of my own bugs.

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

I reviewed my code for the new bug and followed the tutorial a second time. The first thing I did was update my layout for the MainActivity to a RelativeLayout (click below).

I tried rebuilding the app, but no luck. It looked like I forget to add the ArrayList object to the ArrayAdapter constructor. But after adding it in, I rebuilt the app, and it STILL appeared blank. I followed through the tutorial again, and everything appeared to match in my code. Everything, except the DatabaseReference object.

Apparently, I had code leftover from the previous tutorial. My code still invoked the .child() method on the reference assignment for the DatabaseReference object. After removing the .child() method invocation, the list appeared as expected! (click below).

Moving forward, when I change to a new tutorial, I’ll start my project over. Keeping that leftover code ended up costing me more time in the long run. Looks like I learned two things today.

Next time I’ll work on the Realtime Database for a different project…the Salesman’s Travel app.

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

 

Image by PublicDomainPictures from Pixabay

Related

Stuck Yet Again! 77 of 100 Days of Code
Google Never Seems to Stop, 79 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 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