Search in sources :

Example 41 with LayoutAnimationController

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);
}
Also used : LayoutAnimationController(android.view.animation.LayoutAnimationController) Test(org.junit.Test)

Example 42 with LayoutAnimationController

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;
}
Also used : ViewGroup(android.view.ViewGroup) LayoutAnimationController(android.view.animation.LayoutAnimationController) Animation(android.view.animation.Animation) SweetView(com.mingle.widget.SweetView) CRImageView(com.mingle.widget.CRImageView) View(android.view.View)

Aggregations

LayoutAnimationController (android.view.animation.LayoutAnimationController)42 ListView (android.widget.ListView)11 TranslateAnimation (android.view.animation.TranslateAnimation)10 Animation (android.view.animation.Animation)9 Paint (android.graphics.Paint)7 AlphaAnimation (android.view.animation.AlphaAnimation)7 AnimationSet (android.view.animation.AnimationSet)7 Cursor (android.database.Cursor)6 ListAdapter (android.widget.ListAdapter)6 SimpleCursorAdapter (android.widget.SimpleCursorAdapter)6 View (android.view.View)5 Intent (android.content.Intent)3 AdapterView (android.widget.AdapterView)3 ImageView (android.widget.ImageView)3 BaseActivity (com.instructure.androidpolling.app.activities.BaseActivity)3 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 ViewGroup (android.view.ViewGroup)2 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)2 SearchAdapter (cn.liuyin.manhua.adapter.SearchAdapter)2 SwipeDismissListViewTouchListener (com.instructure.androidpolling.app.util.SwipeDismissListViewTouchListener)2