Back to project page AndroidImageSlider.
The source code is released under:
MIT License
If you think the Android project AndroidImageSlider listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.daimajia.slider.demo; /* w ww.j a v a 2 s .c o m*/ import android.util.Log; import android.view.View; import com.daimajia.androidanimations.library.attention.StandUpAnimator; import com.daimajia.slider.library.Animations.BaseAnimationInterface; public class ChildAnimationExample implements BaseAnimationInterface { private final static String TAG = "ChildAnimationExample"; @Override public void onPrepareCurrentItemLeaveScreen(View current) { View descriptionLayout = current.findViewById(com.daimajia.slider.library.R.id.description_layout); if(descriptionLayout!=null){ current.findViewById(com.daimajia.slider.library.R.id.description_layout).setVisibility(View.INVISIBLE); } Log.e(TAG,"onPrepareCurrentItemLeaveScreen called"); } @Override public void onPrepareNextItemShowInScreen(View next) { View descriptionLayout = next.findViewById(com.daimajia.slider.library.R.id.description_layout); if(descriptionLayout!=null){ next.findViewById(com.daimajia.slider.library.R.id.description_layout).setVisibility(View.INVISIBLE); } Log.e(TAG,"onPrepareNextItemShowInScreen called"); } @Override public void onCurrentItemDisappear(View view) { Log.e(TAG,"onCurrentItemDisappear called"); } @Override public void onNextItemAppear(View view) { View descriptionLayout = view.findViewById(com.daimajia.slider.library.R.id.description_layout); if(descriptionLayout!=null){ view.findViewById(com.daimajia.slider.library.R.id.description_layout).setVisibility(View.VISIBLE); // ValueAnimator animator = ObjectAnimator.ofFloat( // descriptionLayout, "y", -descriptionLayout.getHeight(), // 0).setDuration(500); // animator.start(); // new BounceInAnimator().animate(descriptionLayout); new StandUpAnimator().animate(descriptionLayout); } Log.e(TAG,"onCurrentItemDisappear called"); } }