How can we set the timer so that after completion of an Image-view animation, a pop up menu should come from bottom automatically with out the user intervention.
Help is always appreciated……!
here is the code
AnimationDrawable ekgframeAnimation4 =
(AnimationDrawable) ekgimgview4.getBackground();
if (ekgframeAnimation4.isRunning()) {
ekgimgview4.postDelayed(ekgframeAnimation4, 60000);
ekgframeAnimation4.stop();
findViewById(R.id.ekgimgview4).postDelayed(new Runnable()
{
public void run()
{
openOptionsMenu();
}
}, 60000);
}
else {
ekgframeAnimation4.stop();
ekgframeAnimation4.start();
ekgimgview4.postDelayed(ekgframeAnimation4, 60000);
findViewById(R.id.ekgimgview4).postDelayed(new Runnable()
{
public void run()
{
openOptionsMenu();
}
}, 60000);
}
Do a
View.postDelayedcall and in the Runnable callopenOptionsMenu.EDIT: if your animation lasts 1000 milliseconds and there is a View with the id
R.id.exampleview, then something like this:should do it. Let me know if that works out for you.