Since I'm a student in high school not learning any coding at school I've been messing around with a couple different coding languages the last years but never really learned a language 'fluently'. I'm not a complete newbie but still missing some basic things I guess.
I know some of the things are in German - if there are any language issues I'll try to clarify those!
Okay, so I'm creating an app for my school that pulls an xml file from our school website that has the substitutions in it. It's an xml file output by the school's software (found here: http://vplankl.gymnasium-beetzendorf.de/Vertretungsplan_Klassen.xml) which is updated regularly. My goal is it to bring the information to the students in a more a appealing and customizable way. Which means the information is presented in an optimized way for smartphones, you don't have to open your browser and you can select the class you're in to avoid unnecessary information.
So far my app is able to pull the file from the server, extracts all the information from it, filter them by class (chosen in a preference activity) and saves the data to a database on the device.
The way my app is constructed:
I have my MainActivity which is my main screen that'll display the different days I pull the substitutions for in a ViewPager connected to a TabLayout. Within the ViewPager I'm displaying fragments that have a RecyclerView displaying all the information wrapped in a SwipeRefreshLayout. So far so good, now the part I'm kinda stuck at.
It's about the general idea of how to refresh the data and display it if anything has changed.
There a three options to refresh the information. First I have an options menu with a refresh button, secondly by using the SwipeRefreshLayout and thirdly when exiting the settings screen to go back to the MainActivity. So I need to able to call the same method from three different points in the app(MainActivity and TabFragment). The method needs to be able to request the file from the server again, do all the parsing and then display the new data.
The general logic on how that works is clear but I have no clue where to put this refresh function so it can do all that stuff.
My project might be a little messy and any(and I really mean any) suggestions are highly appreciated. I shared the source code on github (https://github.com/Crosswind/Vertretungsplan).
If I left anything out feel free to ask! Thanks in advance!
I know some of the things are in German - if there are any language issues I'll try to clarify those!
Okay, so I'm creating an app for my school that pulls an xml file from our school website that has the substitutions in it. It's an xml file output by the school's software (found here: http://vplankl.gymnasium-beetzendorf.de/Vertretungsplan_Klassen.xml) which is updated regularly. My goal is it to bring the information to the students in a more a appealing and customizable way. Which means the information is presented in an optimized way for smartphones, you don't have to open your browser and you can select the class you're in to avoid unnecessary information.
So far my app is able to pull the file from the server, extracts all the information from it, filter them by class (chosen in a preference activity) and saves the data to a database on the device.
The way my app is constructed:
I have my MainActivity which is my main screen that'll display the different days I pull the substitutions for in a ViewPager connected to a TabLayout. Within the ViewPager I'm displaying fragments that have a RecyclerView displaying all the information wrapped in a SwipeRefreshLayout. So far so good, now the part I'm kinda stuck at.
It's about the general idea of how to refresh the data and display it if anything has changed.
There a three options to refresh the information. First I have an options menu with a refresh button, secondly by using the SwipeRefreshLayout and thirdly when exiting the settings screen to go back to the MainActivity. So I need to able to call the same method from three different points in the app(MainActivity and TabFragment). The method needs to be able to request the file from the server again, do all the parsing and then display the new data.
The general logic on how that works is clear but I have no clue where to put this refresh function so it can do all that stuff.
My project might be a little messy and any(and I really mean any) suggestions are highly appreciated. I shared the source code on github (https://github.com/Crosswind/Vertretungsplan).
If I left anything out feel free to ask! Thanks in advance!