I want to change the background of a fragment based on the time of the day (light for day, dark for night). Right now, I hard coded the background image in the fragment's layout:
android:background="@drawable/weatherbg"
But to have a dynamic background, I assume that I have to do that in the fragment activity class, inside the onCreate method?
I'm not sure how though, since you cannot use setContentView in fragments.
I know I have to write some conditional code, but not sure what's the method to set the background image inside a fragment.
This is my first experience with Android, and any help is greatly appreciated.