I would like to optimize my code a little bit. At the moment, I do not preload any resources in onLayout callback. I do the work in onUpdate. My typical onUpdate looks like this:
findDrawableById("Blablabla1").setBitmap(condition1 ? Rez.Drawables.BlablablaBitmapA : Rez.Drawables.BlablablaBitmapB);
findDrawableById("Blablabla2").setText(condition2 ? Rez.Strings.BlablablaStringA : Rez.Strings.BlablablaStringB);
...
base.onUpdate();
What is the real implementation of Rez.Drawables.Something?
When I call it 2 times, is the second call cheaper on processing time?
I would like to preload resources if this helps performance, but how can I do it and keep my onUpdate structure? Can I just call:
Ui.loadResource(Rez.Drawables.BlablablaBitmapA);
Ui.loadResource(Rez.Drawables.BlablablaBitmapB);
Ui.loadResource(Rez.Strings.BlablablaStringA);
Ui.loadResource(Rez.Strings.BlablablaStringB);
...in onLayout and keep onUpdate unchanged?
Thanks very much. I am little bit lost in how the resources work.
Best Regards,
David