Situation:
I have implemented the code suggested in Android execute code on variable change
brief summary of above answer: A class (IntStoreValue) that stores an int and a listener, and proposes an interface for listening to changes in this int && A custom UI item (in this case a TextView) that implements the above interface and applies setText() when this int is changed.
I implemented this solution by setting this custom textview to listen to a public IntStoreValue constantly modified in my GLSurfaceView renderer class.
This causes a view.ViewRootImpl$CalledFromWrongThreadException. (trying to access UI from outside UI thread)...
This I can live with / understand...
What I don't understand, is why I am able to make this solution work with a custom SeekBar / ProgressBar using setProgress(int newValue) in the onIntChanged interface method...?
I used this "loophole" to make a normal TextView setText() onProgressChanged of my custom seekBar...
Why does this work with these widget.Bar items and not with TextViews?
I don't mind using this "SeekBar pass-through" loophole, but I would like to know why I cannot directly use the TV solution...
Thanks!