Hello, i have method:
public void startGameButtonClicked(View view) {
final TextView shadow = (TextView) findViewById(R.id.main_menu_start_game_button_shadow);
final Animation animation = AnimationUtils.loadAnimation(this, R.anim.main_menu);
shadow.startAnimation(animation);
/** Ugly prototype pausing */
final long startTime = System.currentTimeMillis();
while ((System.currentTimeMillis() - startTime) < 600) {
Log.i("test", Boolean.toString(animation.hasEnded()));
}
final Intent intent = new Intent();
intent.putExtra(EXTRA_BUTTON_ID, START_GAME_BUTTON);
setResult(RESULT_OK, intent);
finish();
}
My animation has duration = 400, how can i pause everything except animation after calling shadow.startAnimation(animation); ? I asking becouse, as you can see - animation is set for button click action, which kills current activity, so animation isnt shown completely.