use of android.view.animation.LayoutAnimationController in project robolectric by robolectric.
the class ShadowViewGroupTest method testLayoutAnimation.
@Test
public void testLayoutAnimation() {
assertThat(root.getLayoutAnimation()).isNull();
LayoutAnimationController layoutAnim = new LayoutAnimationController(context, null);
root.setLayoutAnimation(layoutAnim);
assertThat(root.getLayoutAnimation()).isSameInstanceAs(layoutAnim);
}
use of android.view.animation.LayoutAnimationController in project AndroidSweetSheet by zzz40500.
the class CustomDelegate method createView.
@Override
public View createView() {
View rootView = LayoutInflater.from(mParentVG.getContext()).inflate(R.layout.layout_custom_sweet, null, false);
mSweetView = (SweetView) rootView.findViewById(R.id.sv);
mSweetView.setSweetSheetColor(sweetSheetColor);
mFreeGrowUpParentRelativeLayout = (FreeGrowUpParentRelativeLayout) rootView.findViewById(R.id.freeGrowUpParentF);
mContentRL = (RelativeLayout) rootView.findViewById(R.id.rl);
sliderIm = (CRImageView) rootView.findViewById(R.id.sliderIM);
mSweetView.setAnimationListener(new AnimationImp());
if (mContentView != null) {
mContentRL.removeAllViews();
mContentRL.addView(mContentView);
}
if (mContentViewAnimationType == AnimationType.DuangLayoutAnimation) {
mAnimationView = null;
if (mContentView instanceof ViewGroup) {
mAnimationView = (ViewGroup) mContentView;
} else {
mAnimationView = mContentRL;
}
Animation animation = AnimationUtils.loadAnimation(mContentRL.getContext(), R.anim.item_duang_show);
LayoutAnimationController layoutAnimationController = new LayoutAnimationController(animation);
layoutAnimationController.setDelay(0.1f);
mAnimationView.setLayoutAnimation(layoutAnimationController);
}
if (mContentViewHeight > 0) {
mFreeGrowUpParentRelativeLayout.setContentHeight(mContentViewHeight);
}
return rootView;
}
Aggregations