アニメーションのあるGridView
があります。 activity
のanimation
作品を公開すると、そこから別のアクティビティに行くと、起動時と同じ方法でアニメーションを再開する必要があります。 Backボタンを押すと前のアクティビティに戻りますが、前述のGridView
のアニメーションはありません。ここでは、コードです:あなたの説明からonBackPressed()の前のアクティビティのアニメーションを再開します
CustomGrid adapter = new CustomGrid(Grids.this, web, imageId);
grid = (GridView) findViewById(R.id.grid);
grid.setAdapter(adapter);
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(),R.anim.grid_item_anim);
controller = new GridLayoutAnimationController(animation, .2f, .2f);
grid.setLayoutAnimation(controller);
これは、アクティビティの 'onResume()'で行います。 – SripadRaj