Search in sources :

Example 16 with LayoutAnimationController

use of android.view.animation.LayoutAnimationController in project FlycoDialog_Master by H07000223.

the class NormalListDialog method init.

private void init() {
    widthScale(0.8f);
    /**
     * LayoutAnimation
     */
    TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
    animation.setInterpolator(new DecelerateInterpolator());
    animation.setDuration(550);
    mLac = new LayoutAnimationController(animation, 0.12f);
    mLac.setInterpolator(new DecelerateInterpolator());
}
Also used : DecelerateInterpolator(android.view.animation.DecelerateInterpolator) LayoutAnimationController(android.view.animation.LayoutAnimationController) TranslateAnimation(android.view.animation.TranslateAnimation)

Example 17 with LayoutAnimationController

use of android.view.animation.LayoutAnimationController in project FlycoDialog_Master by H07000223.

the class ActionSheetDialog method init.

private void init() {
    widthScale(0.95f);
    /**
     * LayoutAnimation
     */
    TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 6f, Animation.RELATIVE_TO_SELF, 0);
    animation.setInterpolator(new DecelerateInterpolator());
    animation.setDuration(350);
    animation.setStartOffset(150);
    mLac = new LayoutAnimationController(animation, 0.12f);
    mLac.setInterpolator(new DecelerateInterpolator());
}
Also used : DecelerateInterpolator(android.view.animation.DecelerateInterpolator) LayoutAnimationController(android.view.animation.LayoutAnimationController) TranslateAnimation(android.view.animation.TranslateAnimation)

Example 18 with LayoutAnimationController

use of android.view.animation.LayoutAnimationController in project robolectric by robolectric.

the class ShadowLayoutAnimationControllerTest method setup.

@Before
public void setup() {
    LayoutAnimationController controller = new LayoutAnimationController(ApplicationProvider.getApplicationContext(), null);
    shadow = Shadows.shadowOf(controller);
}
Also used : LayoutAnimationController(android.view.animation.LayoutAnimationController) Before(org.junit.Before)

Example 19 with LayoutAnimationController

use of android.view.animation.LayoutAnimationController in project robolectric by robolectric.

the class ShadowAnimationUtilsTest method getLoadedFromResourceId_forAnimationController_shouldReturnAnimationResourceId.

@Test
public void getLoadedFromResourceId_forAnimationController_shouldReturnAnimationResourceId() {
    final LayoutAnimationController anim = AnimationUtils.loadLayoutAnimation(Robolectric.setupActivity(Activity.class), R.anim.fade_in);
    assertThat(Shadows.shadowOf(anim).getLoadedFromResourceId()).isEqualTo(R.anim.fade_in);
}
Also used : LayoutAnimationController(android.view.animation.LayoutAnimationController) Activity(android.app.Activity) Test(org.junit.Test)

Example 20 with LayoutAnimationController

use of android.view.animation.LayoutAnimationController in project robolectric by robolectric.

the class ShadowAnimationUtils method loadLayoutAnimation.

@Implementation
protected static LayoutAnimationController loadLayoutAnimation(Context context, int id) {
    Animation anim = new TranslateAnimation(0, 0, 30, 0);
    LayoutAnimationController layoutAnim = new LayoutAnimationController(anim);
    ShadowLayoutAnimationController shadowLayoutAnimationController = Shadow.extract(layoutAnim);
    shadowLayoutAnimationController.setLoadedFromResourceId(id);
    return layoutAnim;
}
Also used : LayoutAnimationController(android.view.animation.LayoutAnimationController) TranslateAnimation(android.view.animation.TranslateAnimation) Animation(android.view.animation.Animation) TranslateAnimation(android.view.animation.TranslateAnimation) Implementation(org.robolectric.annotation.Implementation)

Aggregations

LayoutAnimationController (android.view.animation.LayoutAnimationController)35 ListView (android.widget.ListView)11 TranslateAnimation (android.view.animation.TranslateAnimation)9 Animation (android.view.animation.Animation)8 Paint (android.graphics.Paint)7 Cursor (android.database.Cursor)6 AlphaAnimation (android.view.animation.AlphaAnimation)6 AnimationSet (android.view.animation.AnimationSet)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