Sunday March 7th 2021
This weekend I finished up with the tutorial I was watching and made a new project that will actually become my app. I made a bottom navigation bar that is able to flip between fragments all from within the same activity. I then spent my time working on the search fragment and made it look like this
Definitely not my favorite design, but I can always work on that later. I just created this so that I could go to work on the back end to make sure it would work.
I reused some of the code I used before to make my singleton and API connection classes, but I had to make a few modifications to make them work in the new setup. I got it working, though not quite the full functionality I want. I just limited it to the city name as the only parameter that actually does anything for the request. Next time I work on this I want to add the other functionality for the other inputs.
Overall I learned a lot about fragments, activities, context, XML, and using the resource file to make values to use in the XML files of my project.
Some links I used
https://stackoverflow.com/questions/6215239/getactivity-returns-null-in-fragment-function
https://guides.codepath.com/android/creating-and-using-fragments
https://developer.android.com/guide/fragments/create
There are a lot more, but these were the ones I still had open

Comments
Post a Comment