private void animateInFrameDetails() {
frameDetails.setVisibility(View.VISIBLE);
ViewUtils.onLaidOut(frameDetails, new Runnable() {
@Override
public void run() {
ObjectAnimator alpha = ObjectAnimator.ofFloat(frameDetails, View.ALPHA, 0.4f, 1f);
ObjectAnimator translate = ofFloat(frameDetails, View.TRANSLATION_Y, frameDetails.getHeight() * 0.3f, 0f);
AnimatorSet set = new AnimatorSet();
set.playTogether(alpha, translate);
set.setDuration(ANIM_DURATION);
set.setInterpolator(new LinearOutSlowInInterpolator());
set.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
frameMaster.setVisibility(View.GONE);
}
});
set.start();
}
});
}
java类android.support.v4.view.animation.LinearOutSlowInInterpolator的实例源码
ContainersLayout.java 文件源码
项目:MaterialMasterDetail
阅读 22
收藏 0
点赞 0
评论 0
AnimUtils.java 文件源码
项目:Mire
阅读 30
收藏 0
点赞 0
评论 0
public static void showFab(@Nullable FloatingActionButton fab)
{
if (fab == null)
return;
if (ViewCompat.isLaidOut(fab))
{
fab.show();
return;
}
fab.animate().cancel();
fab.setScaleX(0f);
fab.setScaleY(0f);
fab.setAlpha(0f);
fab.setVisibility(View.VISIBLE);
fab.animate().setDuration(200).scaleX(1).scaleY(1).alpha(1).setInterpolator(new LinearOutSlowInInterpolator());
}
AnimUtils.java 文件源码
项目:Mire
阅读 27
收藏 0
点赞 0
评论 0
public static void hideFab(@Nullable FloatingActionButton fab)
{
if (fab == null)
return;
if (ViewCompat.isLaidOut(fab))
{
fab.hide();
return;
}
fab.animate().cancel();
fab.setScaleX(1f);
fab.setScaleY(1f);
fab.setAlpha(1f);
fab.setVisibility(View.GONE);
fab.animate().setDuration(200).scaleX(0).scaleY(0).alpha(0).setInterpolator(new LinearOutSlowInInterpolator());
}
PaymentRequestUI.java 文件源码
项目:chromium-for-android-56-debug-video
阅读 23
收藏 0
点赞 0
评论 0
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
if (mSheetAnimator != null) mSheetAnimator.cancel();
mRequestView.removeOnLayoutChangeListener(this);
mContainerHeightDifference = (bottom - top) - (oldBottom - oldTop);
ValueAnimator containerAnimator = ValueAnimator.ofFloat(1f, 0f);
containerAnimator.addUpdateListener(new AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float alpha = (Float) animation.getAnimatedValue();
update(alpha);
}
});
mSheetAnimator = containerAnimator;
mSheetAnimator.setDuration(DIALOG_ENTER_ANIMATION_MS);
mSheetAnimator.setInterpolator(new LinearOutSlowInInterpolator());
mSheetAnimator.addListener(this);
mSheetAnimator.start();
}
StaggeredAnimationGroupTest.java 文件源码
项目:StaggeredAnimationGroup
阅读 34
收藏 0
点赞 0
评论 0
@Test
public void preparePartialTransition_setsPartialInterpolator() {
//given
final StaggeredAnimationGroup spiedGroup = prepareSpiedGroup();
final TimeInterpolator testInterpolator = new LinearOutSlowInInterpolator();
final Transition spiedTransition = spy(new AutoTransition());
final StaggeredAnimationGroup.PartialTransitionFactory factory =
new StaggeredAnimationGroup.PartialTransitionFactory() {
@Override
public Transition createPartialTransition(boolean show, int viewId, int indexInTransition) {
return spiedTransition;
}
};
spiedGroup.setPartialTransitionFactory(factory);
spiedGroup.setPartialInterpolator(testInterpolator);
//when
spiedGroup.preparePartialTransition(true, 0, 0);
//then
verify(spiedTransition, times(1)).setInterpolator(testInterpolator);
}
AnimationController.java 文件源码
项目:Sunstrike
阅读 22
收藏 0
点赞 0
评论 0
private void startAnimationCollapse(int position, float startZ, float startY,
float firstScaleX, float firstScaleY,
float scaleX, float scaleY) {
transitionAnimHiddenView = new TransitionAnimation(hiddenViews.get(position));
transitionAnimHiddenView.setInterpolator(new LinearOutSlowInInterpolator());
transitionAnimHiddenView.startAnimation(startZ,
0,
TransitionAnimation.AnimationType.TRANSLATION_Z);
transitionAnimHiddenView.startAnimation(startY,
valueHandler.getMaxHeightHiddenView(position),
TransitionAnimation.AnimationType.TRANSLATION_Y);
transitionAnimHiddenView.startAnimation(firstScaleX,
scaleX,
TransitionAnimation.AnimationType.SCALE_X);
transitionAnimHiddenView.startAnimation(firstScaleY,
scaleY,
TransitionAnimation.AnimationType.SCALE_Y);
}
AnimationController.java 文件源码
项目:Sunstrike
阅读 24
收藏 0
点赞 0
评论 0
void endAnimationCollapse(int progress) {
setTransitionFirstViewZ(valueHandler.getCurrentZFirstView(progress),
valueHandler.getMinZ(), new LinearOutSlowInInterpolator());
moveViews(valueHandler.getYMovingViews(progress), valueHandler.getStartYMoveViews(),
new LinearOutSlowInInterpolator());
for (int i = 0; i < hiddenViews.size(); i++) {
startAnimationCollapse(i,
valueHandler.getCurrentZView(progress, i),
valueHandler.getMaxHeightHiddenView(i)
- valueHandler.getCurrentYViewProgress(progress, i),
valueHandler.getScaleXView(progress, i),
valueHandler.getScaleYView(progress, i),
valueHandler.getMinScaleX(),
0);
}
}
EventDetails.java 文件源码
项目:Matrix2017
阅读 34
收藏 0
点赞 0
评论 0
@Override
protected void onStart() {
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
Slide slide = new Slide(Gravity.BOTTOM);
if(isFirstLaunch) {
fab.hide();
isFirstLaunch = false;
}
slide.addTarget(R.id.description_card);
slide.addTarget(R.id.venue_time_card);
slide.addTarget(R.id.registration_card);
slide.addTarget(R.id.prizes_card);
slide.addTarget(R.id.organizers_card);
slide.setInterpolator(new LinearOutSlowInInterpolator());
getWindow().setEnterTransition(slide);
getWindow().setExitTransition(slide);
getWindow().setReenterTransition(slide);
setupEnterAnimation();
}
super.onStart();
}
IconsBaseFragment.java 文件源码
项目:candybar-library
阅读 20
收藏 0
点赞 0
评论 0
private void initTabs() {
AnimationHelper.slideDownIn(mTabLayout)
.interpolator(new LinearOutSlowInInterpolator())
.callback(new AnimationHelper.Callback() {
@Override
public void onAnimationStart() {
}
@Override
public void onAnimationEnd() {
if (getActivity() == null) return;
if (Preferences.get(getActivity()).isToolbarShadowEnabled()) {
AnimationHelper.fade(getActivity().findViewById(R.id.shadow)).start();
}
mGetIcons = new IconsLoader().execute();
}
})
.start();
}
RequestFragment.java 文件源码
项目:candybar-library
阅读 24
收藏 0
点赞 0
评论 0
@Override
protected void onPostExecute(Boolean aBoolean) {
super.onPostExecute(aBoolean);
if (getActivity() == null) return;
if (getActivity().isFinishing()) return;
mAsyncTask = null;
mProgress.setVisibility(View.GONE);
if (aBoolean) {
setHasOptionsMenu(true);
mAdapter = new RequestAdapter(getActivity(),
requests, mManager.getSpanCount());
mRecyclerView.setAdapter(mAdapter);
AnimationHelper.show(mFab)
.interpolator(new LinearOutSlowInInterpolator())
.start();
TapIntroHelper.showRequestIntro(getActivity(), mRecyclerView);
} else {
mRecyclerView.setAdapter(null);
Toast.makeText(getActivity(), R.string.request_appfilter_failed, Toast.LENGTH_LONG).show();
}
}
AHBottomNavigation.java 文件源码
项目:SystemBarTint
阅读 31
收藏 0
点赞 0
评论 0
/**
* Hide Bottom Navigation with or without animation
*
* @param withAnimation Boolean
*/
public void hideBottomNavigation(boolean withAnimation) {
if (bottomNavigationBehavior != null) {
bottomNavigationBehavior.hideView(this, bottomNavigationHeight, withAnimation);
} else if (getParent() instanceof CoordinatorLayout) {
//TODO
needHideBottomNavigation = true;
hideBottomNavigationWithAnimation = withAnimation;
} else {
// Hide bottom navigation
ViewCompat.animate(this)
.translationY(bottomNavigationHeight)
.setInterpolator(new LinearOutSlowInInterpolator())
.setDuration(withAnimation ? 300 : 0)
.start();
}
}
SegmentedButtonGroup.java 文件源码
项目:SegmentedButton
阅读 31
收藏 0
点赞 0
评论 0
private void initInterpolations() {
ArrayList<Class> interpolatorList = new ArrayList<Class>() {{
add(FastOutSlowInInterpolator.class);
add(BounceInterpolator.class);
add(LinearInterpolator.class);
add(DecelerateInterpolator.class);
add(CycleInterpolator.class);
add(AnticipateInterpolator.class);
add(AccelerateDecelerateInterpolator.class);
add(AccelerateInterpolator.class);
add(AnticipateOvershootInterpolator.class);
add(FastOutLinearInInterpolator.class);
add(LinearOutSlowInInterpolator.class);
add(OvershootInterpolator.class);
}};
try {
interpolatorSelector = (Interpolator) interpolatorList.get(animateSelector).newInstance();
} catch (Exception e) {
e.printStackTrace();
}
}
BloopActivity.java 文件源码
项目:Bloop
阅读 27
收藏 0
点赞 0
评论 0
/**
* Show the fab and add the ability to place a flag.
*/
private void showPlaceFlag() {
// if we have set the visibility to invisible (as we do in onCreate), we should put this
// below the screen
if (mPlaceFlagButton.getVisibility() == View.INVISIBLE) {
mPlaceFlagButton.setTranslationY(
mPlaceFlagButton.getHeight() + mPlaceFlagButtonMarginBottom
);
mPlaceFlagButton.setVisibility(View.VISIBLE);
}
mPlaceFlagButton
.animate()
.translationY(0)
.setDuration(150)
.setInterpolator(new LinearOutSlowInInterpolator())
.start();
mCannotCaptureTextView.setVisibility(View.VISIBLE);
mFlagButtonIsShown = true;
}
BottomNavigation.java 文件源码
项目:MVPFrames
阅读 26
收藏 0
点赞 0
评论 0
/**
* Hide Bottom Navigation with or without animation
*
* @param withAnimation Boolean
*/
public void hideBottomNavigation(boolean withAnimation) {
if (bottomNavigationBehavior != null) {
bottomNavigationBehavior.hideView(this, bottomNavigationHeight, withAnimation);
} else if (getParent() instanceof CoordinatorLayout) {
needHideBottomNavigation = true;
hideBottomNavigationWithAnimation = withAnimation;
} else {
// Hide bottom navigation
ViewCompat.animate(this)
.translationY(bottomNavigationHeight)
.setInterpolator(new LinearOutSlowInInterpolator())
.setDuration(withAnimation ? 300 : 0)
.start();
}
}
PaymentRequestUI.java 文件源码
项目:AndroidChromium
阅读 24
收藏 0
点赞 0
评论 0
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
if (mSheetAnimator != null) mSheetAnimator.cancel();
mRequestView.removeOnLayoutChangeListener(this);
mContainerHeightDifference = (bottom - top) - (oldBottom - oldTop);
ValueAnimator containerAnimator = ValueAnimator.ofFloat(1f, 0f);
containerAnimator.addUpdateListener(new AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float alpha = (Float) animation.getAnimatedValue();
update(alpha);
}
});
mSheetAnimator = containerAnimator;
mSheetAnimator.setDuration(DIALOG_ENTER_ANIMATION_MS);
mSheetAnimator.setInterpolator(new LinearOutSlowInInterpolator());
mSheetAnimator.addListener(this);
mSheetAnimator.start();
}
MultiChoicesCircleButton.java 文件源码
项目:MultiChoicesCircleButton
阅读 24
收藏 0
点赞 0
评论 0
public void hide(boolean withAnimation) {
if (mHidden) {
return;
}
mHidden = true;
if (mState == STATE_EXPANDED) {
mState = STATE_COLLAPSED;
mCurrentExpandProgress = 0;
mHoverItemIndex = -1;
invalidate();
}
ViewCompat.animate(this)
.translationY(mCollapseRadius)
.setInterpolator(new LinearOutSlowInInterpolator())
.setDuration(withAnimation ? 200 : 0)
.start();
}
BrowserActionsFallbackMenuDialog.java 文件源码
项目:custom-tabs-client
阅读 23
收藏 0
点赞 0
评论 0
private void startAnimation(boolean isEnterAnimation) {
float from = isEnterAnimation ? 0f : 1f;
float to = isEnterAnimation ? 1f : 0f;
long duration = isEnterAnimation ? ENTER_ANIMATION_DURATION_MS : EXIT_ANIMATION_DURATION_MS;
mContentView.setScaleX(from);
mContentView.setScaleY(from);
mContentView.animate()
.scaleX(to)
.scaleY(to)
.setDuration(duration)
.setInterpolator(new LinearOutSlowInInterpolator())
.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
if (!isEnterAnimation) {
BrowserActionsFallbackMenuDialog.super.dismiss();
}
}
})
.start();
}
PaymentRequestUI.java 文件源码
项目:365browser
阅读 21
收藏 0
点赞 0
评论 0
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
if (mSheetAnimator != null) mSheetAnimator.cancel();
mRequestView.removeOnLayoutChangeListener(this);
mContainerHeightDifference = (bottom - top) - (oldBottom - oldTop);
ValueAnimator containerAnimator = ValueAnimator.ofFloat(1f, 0f);
containerAnimator.addUpdateListener(new AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float alpha = (Float) animation.getAnimatedValue();
update(alpha);
}
});
mSheetAnimator = containerAnimator;
mSheetAnimator.setDuration(DIALOG_ENTER_ANIMATION_MS);
mSheetAnimator.setInterpolator(new LinearOutSlowInInterpolator());
mSheetAnimator.addListener(this);
mSheetAnimator.start();
}
ViewTransformer.java 文件源码
项目:hawkular-android-client
阅读 22
收藏 0
点赞 0
评论 0
@UiThread
public void collapse() {
ValueAnimator animator = ValueAnimator.ofInt(Views.measureHeight(view), 0);
animator.setInterpolator(new LinearOutSlowInInterpolator());
animator.setDuration(Durations.MEDIUM);
animator.addUpdateListener(this);
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
view.setVisibility(View.GONE);
}
});
animator.start();
}
MapActivity.java 文件源码
项目:mvhs-app
阅读 25
收藏 0
点赞 0
评论 0
private void showList(int listMarginTop) {
final FrameLayout listFrame = (FrameLayout) findViewById(R.id.activity_map_list_fragment_container);
ObjectAnimator animator = new ObjectAnimator();
animator.setProperty(View.Y);
animator.setFloatValues(Utils.convertDpToPx(this, listMarginTop));
animator.setTarget(listFrame);
animator.setDuration(250);
animator.setInterpolator(new LinearOutSlowInInterpolator());
animator.start();
ObjectAnimator animator2 = new ObjectAnimator();
animator2.setProperty(View.ALPHA);
animator2.setFloatValues(1f);
animator2.setTarget(findViewById(R.id.activity_map_searchbox_background));
animator2.setDuration(250);
animator2.setInterpolator(new LinearOutSlowInInterpolator());
animator2.start();
listFrame.setPadding(0, 0, 0, Utils.convertDpToPx(this, listMarginTop));
mListShowing = true;
mSearchView.setDrawerIconState(false, true);
}
MapActivity.java 文件源码
项目:mvhs-app
阅读 28
收藏 0
点赞 0
评论 0
private void hideList() {
final FrameLayout layout = (FrameLayout) findViewById(R.id.activity_map_list_fragment_container);
ObjectAnimator animator = new ObjectAnimator();
animator.setProperty(View.Y);
animator.setTarget(layout);
animator.setFloatValues(layout.getMeasuredHeight());
animator.setDuration(250);
animator.setInterpolator(new FastOutLinearInInterpolator());
animator.start();
ObjectAnimator animator2 = new ObjectAnimator();
animator2.setProperty(View.ALPHA);
animator2.setFloatValues(0f);
animator2.setTarget(findViewById(R.id.activity_map_searchbox_background));
animator2.setDuration(250);
animator2.setInterpolator(new LinearOutSlowInInterpolator());
animator2.start();
mListShowing = false;
mSearchView.setDrawerIconState(true, true);
}
parent.java 文件源码
项目:GitHub
阅读 33
收藏 0
点赞 0
评论 0
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void rotationExpandIcon(float from, float to) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
ValueAnimator valueAnimator = ValueAnimator.ofFloat(from, to);
valueAnimator.setDuration(150);
valueAnimator.setInterpolator(new LinearOutSlowInInterpolator());
valueAnimator.addUpdateListener(this);
valueAnimator.start();
}
}
SliderHeader.java 文件源码
项目:GitHub
阅读 28
收藏 0
点赞 0
评论 0
private View initSlider(UltimateRecyclerView listview) {
final View view = LayoutInflater.from(getApplication()).inflate(R.layout.list_item_header, null, false);
final ViewTreeObserver vto = listview.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public void onGlobalLayout() {
view.getViewTreeObserver().removeOnGlobalLayoutListener(this);
//Log.d("vto", "globallayout");
final SliderLayout sl = (SliderLayout) view.findViewById(R.id.header_slider);
try {
sl.setOffscreenPageLimit(1);
sl.setSliderTransformDuration(500, new LinearOutSlowInInterpolator());
sl.setPresetTransformer(TransformerL.Default);
sl.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
sl.getPagerIndicator().setDefaultIndicatorColor(R.color.accent, R.color.primaryDark);
sl.getPagerIndicator().setVisibility(View.GONE);
setup_double_faces(sl);
} catch (Exception e) {
e.printStackTrace();
}
}
});
return view;
}
Utils.java 文件源码
项目:Farmacias
阅读 27
收藏 0
点赞 0
评论 0
/**
* Creates interpolator.
*
* @param interpolatorType
* @return
*/
public static TimeInterpolator createInterpolator(@IntRange(from = 0, to = 10) final int interpolatorType) {
switch (interpolatorType) {
case ACCELERATE_DECELERATE_INTERPOLATOR:
return new AccelerateDecelerateInterpolator();
case ACCELERATE_INTERPOLATOR:
return new AccelerateInterpolator();
case ANTICIPATE_INTERPOLATOR:
return new AnticipateInterpolator();
case ANTICIPATE_OVERSHOOT_INTERPOLATOR:
return new AnticipateOvershootInterpolator();
case BOUNCE_INTERPOLATOR:
return new BounceInterpolator();
case DECELERATE_INTERPOLATOR:
return new DecelerateInterpolator();
case FAST_OUT_LINEAR_IN_INTERPOLATOR:
return new FastOutLinearInInterpolator();
case FAST_OUT_SLOW_IN_INTERPOLATOR:
return new FastOutSlowInInterpolator();
case LINEAR_INTERPOLATOR:
return new LinearInterpolator();
case LINEAR_OUT_SLOW_IN_INTERPOLATOR:
return new LinearOutSlowInInterpolator();
case OVERSHOOT_INTERPOLATOR:
return new OvershootInterpolator();
default:
return new LinearInterpolator();
}
}
SecondAdapter.java 文件源码
项目:android-radiobutton-extended
阅读 21
收藏 0
点赞 0
评论 0
@Override
public void onBindRadioGroupedViewHolder(SecondViewHolder holder, int position, List<Object> payloads) {
{
setDefaults(holder, position);
}
{
MyPayload payload = null;
for (Object itrPayload : payloads) {
if (itrPayload != null && itrPayload instanceof MyPayload) {
payload = (MyPayload) itrPayload;
break;
}
}
if (payload != null) {
ViewPropertyAnimatorCompat animator = ViewCompat
.animate(holder.getIcon())
.setInterpolator(new LinearOutSlowInInterpolator())
.setDuration(500);
int diff = payload.calcDiffY();
if (diff == 0) {
ViewCompat.setTranslationX(holder.getIcon(), holder.getIcon().getMeasuredWidth() * -1);
animator = animator
.translationX(0);
} else {
ViewCompat.setTranslationY(holder.getIcon(), diff);
animator = animator
.translationY(0);
}
animator.start();
}
}
}
PaymentRequestSection.java 文件源码
项目:chromium-for-android-56-debug-video
阅读 31
收藏 0
点赞 0
评论 0
@Override
public void run() {
Animation out = new AlphaAnimation(mUpdatedView.getAlpha(), 0.0f);
out.setDuration(UPDATE_TEXT_ANIMATION_DURATION_MS);
out.setInterpolator(new LinearOutSlowInInterpolator());
out.setFillAfter(true);
mUpdatedView.startAnimation(out);
}
PaymentRequestSection.java 文件源码
项目:chromium-for-android-56-debug-video
阅读 30
收藏 0
点赞 0
评论 0
/**
* Starts the animation to make the update text view fade in then fade out.
*/
private void startUpdateViewAnimation() {
// Create and start a fade in anmiation for the mUpdatedView. Re-use the current alpha
// to avoid restarting a previous or current fade in animation.
Animation in = new AlphaAnimation(mUpdatedView.getAlpha(), 1.0f);
in.setDuration(UPDATE_TEXT_ANIMATION_DURATION_MS);
in.setInterpolator(new LinearOutSlowInInterpolator());
in.setFillAfter(true);
mUpdatedView.startAnimation(in);
// Cancel all pending fade out animations and create a new on to be executed a little
// while after the fade in.
mHandler.removeCallbacks(mFadeOutRunnable);
mHandler.postDelayed(mFadeOutRunnable, UPDATE_TEXT_VISIBILITY_DURATION_MS);
}
PaymentRequestUI.java 文件源码
项目:chromium-for-android-56-debug-video
阅读 27
收藏 0
点赞 0
评论 0
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
mRequestView.removeOnLayoutChangeListener(this);
Animator scrimFader = ObjectAnimator.ofInt(mFullContainer.getBackground(),
AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 0, 127);
Animator alphaAnimator = ObjectAnimator.ofFloat(mFullContainer, View.ALPHA, 0f, 1f);
AnimatorSet alphaSet = new AnimatorSet();
alphaSet.playTogether(scrimFader, alphaAnimator);
alphaSet.setDuration(DIALOG_ENTER_ANIMATION_MS);
alphaSet.setInterpolator(new LinearOutSlowInInterpolator());
alphaSet.start();
}
PaymentRequestUI.java 文件源码
项目:chromium-for-android-56-debug-video
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
mRequestView.removeOnLayoutChangeListener(this);
mSheetAnimator = ObjectAnimator.ofFloat(
mRequestView, View.TRANSLATION_Y, mAnimatorTranslation, 0);
mSheetAnimator.setDuration(DIALOG_ENTER_ANIMATION_MS);
mSheetAnimator.setInterpolator(new LinearOutSlowInInterpolator());
mSheetAnimator.start();
}
PopupCircleView.java 文件源码
项目:PopupCircleMenu
阅读 27
收藏 0
点赞 0
评论 0
private void init() {
mLayoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
mDecorView = (ViewGroup) mContext.getWindow().getDecorView();
mPopup = new PopupLayer(mContext, mRadius);
mPopup.setVisibility(INVISIBLE);
mAlphAnimator = new ValueAnimator();
mAlphAnimator.setFloatValues(0.0f, 1.0f);
mAlphAnimator.setDuration(mAnimDuration);
mAlphAnimator.setInterpolator(new LinearOutSlowInInterpolator());
mAlphAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
mPopup.setShadowViewAlpha(Float.valueOf(animation.getAnimatedValue() + ""));
}
});
addOnLayoutChangeListener(new OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
initButtons();
if (onButtonPreparedListener != null)
onButtonPreparedListener.onPrepared(mButtons);
}
});
}