iDroid Explorer iDroid Explorer - 3 months ago 10
Android Question

How to create the delay of 1 sec before set the alpha of View?

In My Application i am going to set the alpha after one animation.
As like:

hideMenu = AnimationUtils.loadAnimation( getApplication(), R.anim.menu_layout_hide);
menuLayout.startAnimation(hideMenu);
menuLayout.setVisibility(View.GONE);


But i want to set the delay of 1 Sec before the Alpha set th the View. as Because of that i am not able to see the Animation of that layout. So How it is possibe ?

Thanks.

Answer

In your animation xml file you can use android:startOffset attribute:

android:startOffset int. The amount of milliseconds the animation delays after start() is called.