Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 341
Shreyash Mahajan Avatar asked Dec 07 '11 09:12

Shreyash Mahajan


Video Answer


1 Answers

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. 
like image 176
Dmytro Danylyk Avatar answered Oct 17 '22 09:10

Dmytro Danylyk