I have set up the PreferencesActivity in my app and included the ability to change app colors. To get the change to take effect though I seem to have to close the app and reopen it though.
To try to fix this I set up a check on the return to the Main activity, as shown here:
This doesn't seem to work though, the colors remain unchanged. Is there a way to restart the app programmatically that I should be using instead of this?
To try to fix this I set up a check on the return to the Main activity, as shown here:
B4X:
Sub Activity_Resume
'If coming from the preferences activity, restart. This is turned on in the preferences screen.
If PreferencesOpened Then
Activity.Finish
StartActivity(Me)
PreferencesOpened = False
End If
End Sub
This doesn't seem to work though, the colors remain unchanged. Is there a way to restart the app programmatically that I should be using instead of this?
Last edited: