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());
}
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());
}
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);
}
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);
}
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;
}
Aggregations