So I have a field of ImageButtons defined in XML whose positions are translated as follows:
public void onWindowFocusChanged(boolean hasFocus){
super.onWindowFocusChanged(hasFocus);
imageButton1.setTranslationX(10);
//etc etc
This works fine and moves each member within the field as desired. However, after cycling through lifecycle methods
onPause onStop onDestroy onCreate onStart onResume
setTranslationX(int x) seems to fail to work and all ImageButtons return to their locations as defined in XML. I have tried placing it directly in these lifecycle methods, or calling it from them, or from onWindowFocusChanged again, but this doesn't seem to work.
Any advice??
No comments:
Post a Comment