In fact, I want to display a progress dialog while adding and loading an object.
I have this in my three dimensions activity :
And i have this in my "Choice" class :
If i launch the code, we never see the progress dialog. It's because "callbackSuccess()" is immediately called (i suppose that "loadSerializedObject" or "addObject" works with thread).
But, on the tablet, the model appears several seconds later whereas progress dialog is already closed.
Sorry for my bad english. I'am French.
Edit :
I put a breakpoint on "pg.hide()". I should see the progress dialog. But no...
There are possible problems to show progress dialog over a GLView ?
I have this in my three dimensions activity :
Code Select
final ProgressDialog pg = new ProgressDialog(this);
pg.setTitle("Chargement...");
pg.setCancelable(false);
pg.show();
choice.applyOn3DWorld(this.mRenderer.getWorld(), this, new CallBack() {
@Override
public void callbackSuccess() {
pg.hide();
}
@Override
public void callbackError() {
//Nothing to do
}
});
And i have this in my "Choice" class :
Code Select
public void applyOn3DWorld(...){
Object3D ob3D = null;
try {
ob3D = Loader.loadSerializedObject(new FileInputStream(TabConstant.PATH_TO_3D_MODEL + ob.getFile()));
world.addObject(ob3D);
callback.callbackSuccess();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
If i launch the code, we never see the progress dialog. It's because "callbackSuccess()" is immediately called (i suppose that "loadSerializedObject" or "addObject" works with thread).
But, on the tablet, the model appears several seconds later whereas progress dialog is already closed.
Sorry for my bad english. I'am French.
Edit :
I put a breakpoint on "pg.hide()". I should see the progress dialog. But no...
There are possible problems to show progress dialog over a GLView ?