my animation button don't appear long enough

Raz

New Member
In my android app, I have 4 image buttons that are animated with an xml:\[code\]<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/home1" android:state_focused="true" android:state_pressed="true" /> <item android:drawable="@drawable/home1" android:state_focused="false" android:state_pressed="true" /> <item android:drawable="@drawable/home" android:state_focused="true" /> <item android:drawable="@drawable/home2" android:state_focused="false" android:state_pressed="false" /></selector>\[/code\]When I click on the button, the animation runs but it does not appear properly because the new activity opens so quickly. I want the full animation to be seen, I think i have do do a sleep methodbut i didn't know wher exactly this is my action button :\[code\] btn_photos.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { // Launching News Feed Screen Intent i = new Intent(getApplicationContext(), PhotosActivity.class); startActivity(i); } });\[/code\]pls any help :)
 
Back
Top