lschmid83 / 12-Step-Recovery-Guide

This is an Android app written in Java and Android Studio. It provides 12-Step reading materials, daily quotes, meditations, motivational images, a meeting map and speaker tapes.
https://www.citexsoftware.co.uk/recovery-meeting-finder
44 stars 0 forks source link

Daily image is not updating or currently retrieved from the web on the Home fragment #22

Closed lschmid83 closed 3 months ago

lschmid83 commented 3 months ago

The daily image is supposed to change to a random image every time the user opens the Home fragment. The code is mostly in place to do this but needs some work. I have decided to package all of the daily images with the app itself instead of downloading them from my website as that requires access to the internet and means it takes time for the image to appear. The code which handles this can be found under ui/home/HomeFragment.java ln.310. It can be greatly simplified instead of only producing a different image every time the date changes using a database value it can simply be a new random image every time the screen is displayed. The images themselves can be found in the assets/daily-image folder.

lschmid83 commented 3 months ago

I have removed the unnecessary fields from the database to update the image based on date change. It now updates to a random image read from the assets folder each time the Home fragment is displayed.