Posts

Showing posts from March, 2021

Sunday March 7th 2021

Image
 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...

Wednesday March 3rd Update

Image
 Today I kept going along in the tutorial I am watching and made some modifications to my code. The idea was to make a singleton request queue class in order to limit the amount of network traffic that app used and just put everything through the one queue. This was done by making the following singleton class I also made a few changes to simplify the code in the button listeners by creating a class specifically for interacting with the API and then the listeners just instantiate an object and call methods on it. Doing this required me to use an async function which wasn't too difficult to make actually. I made a listener interface and then implemented it to return a value whenever a response is given back from the API. This makes it work much smoother.  Not sure if I actually ever put the link to the tutorial. So  here it is .  I didn't really use any more links today. Mostly just followed along and did my own thing.