I put animated gif
into the Resource Editor. I created a Button based on this gif
Image , and the Button has also a text :
r = Resources.open("/resources.res");
uploadImg = r.getImage("upload");
envoieBtn = new Button("Envoyer", uploadImg);
envoieBtn.setTextPosition(Label.BOTTOM);
envoieBtn.setAlignment(Label.CENTER);
This Button is put in the main screen , and this Button is not enabled until the phone mobile database ( RecordStore ) is populated via the third Button ( second line first column in the captured image ) on the main screen.
My problem is that even if the envoieBtn
Button is disabled then the gif Image on it is animated ( the red arrow is still moving upward ) ! So how to suspend the animation of the gif
image ?
My second question is how to center the image within the Button because on the captured image we see that the gif is not centered like the Button text.
Here is the captured image :