本文整理匯總了Java中android.support.v4.view.animation.LinearOutSlowInInterpolator類的典型用法代碼示例。如果您正苦於以下問題:Java LinearOutSlowInInterpolator類的具體用法?Java LinearOutSlowInInterpolator怎麽用?Java LinearOutSlowInInterpolator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
LinearOutSlowInInterpolator類屬於android.support.v4.view.animation包,在下文中一共展示了LinearOutSlowInInterpolator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showFab
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
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());
}
示例2: animateInFrameDetails
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
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();
}
});
}
示例3: hideFab
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
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());
}
示例4: onLayoutChange
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
@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();
}
示例5: preparePartialTransition_setsPartialInterpolator
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
@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);
}
示例6: startAnimationCollapse
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
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);
}
示例7: endAnimationCollapse
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
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);
}
}
示例8: onStart
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
@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();
}
示例9: initTabs
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
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();
}
示例10: onPostExecute
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
@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();
}
}
示例11: hideBottomNavigation
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
/**
* 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();
}
}
示例12: initInterpolations
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
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();
}
}
示例13: showPlaceFlag
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
/**
* 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;
}
示例14: hideBottomNavigation
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
/**
* 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();
}
}
示例15: hide
import android.support.v4.view.animation.LinearOutSlowInInterpolator; //導入依賴的package包/類
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();
}