androidx.interpolator.view.animation.LinearOutSlowInInterpolator Java Examples

The following examples show how to use androidx.interpolator.view.animation.LinearOutSlowInInterpolator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IconsBaseFragment.java    From candybar with Apache License 2.0 6 votes vote down vote up
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();
}
 
Example #2
Source File: RequestFragment.java    From candybar with Apache License 2.0 6 votes vote down vote up
@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();

        if (getActivity().getResources().getBoolean(R.bool.show_intro)) {
            TapIntroHelper.showRequestIntro(getActivity(), mRecyclerView);
        }
    } else {
        mRecyclerView.setAdapter(null);
        Toast.makeText(getActivity(), R.string.request_appfilter_failed, Toast.LENGTH_LONG).show();
    }
}
 
Example #3
Source File: MainActivity.java    From MaterialTapTargetPrompt with Apache License 2.0 6 votes vote down vote up
public void showSequence(View view) {

        new MaterialTapTargetSequence()
            .addPrompt(new MaterialTapTargetPrompt.Builder(MainActivity.this)
                .setTarget(findViewById(R.id.fab))
                .setPrimaryText("Step 1")
                .setSecondaryText("This will show for 4 seconds")
                .setFocalPadding(R.dimen.dp40)
                .create(), 4000)
            .addPrompt(new MaterialTapTargetPrompt.Builder(MainActivity.this)
                .setTarget(findViewById(R.id.action_search))
                .setPrimaryText("Step 2")
                .setSecondaryText("This will show till you press it")
                .setAnimationInterpolator(new LinearOutSlowInInterpolator())
                .setFocalPadding(R.dimen.dp40)
                .setIcon(R.drawable.ic_search))
            .show();
    }
 
Example #4
Source File: WallpapersFragment.java    From candybar with Apache License 2.0 5 votes vote down vote up
private void showPopupBubble() {
    int wallpapersCount = Database.get(getActivity()).getWallpapersCount();
    if (wallpapersCount == 0) return;

    if (Preferences.get(getActivity()).getAvailableWallpapersCount() > wallpapersCount) {
        AnimationHelper.show(mPopupBubble)
                .interpolator(new LinearOutSlowInInterpolator())
                .start();
    }
}
 
Example #5
Source File: Animation.java    From MusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
public static List<Interpolator> getInterpolatorList() {
    List<Interpolator> interpolatorList = new ArrayList<>();
    interpolatorList.add(new LinearInterpolator());
    interpolatorList.add(new AccelerateInterpolator());
    interpolatorList.add(new DecelerateInterpolator());
    interpolatorList.add(new AccelerateDecelerateInterpolator());
    interpolatorList.add(new OvershootInterpolator());
    interpolatorList.add(new AnticipateInterpolator());
    interpolatorList.add(new AnticipateOvershootInterpolator());
    interpolatorList.add(new BounceInterpolator());
    interpolatorList.add(new FastOutLinearInInterpolator());
    interpolatorList.add(new FastOutSlowInInterpolator());
    interpolatorList.add(new LinearOutSlowInInterpolator());
    return interpolatorList;
}
 
Example #6
Source File: Animation.java    From MusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
@NonNull
public static Interpolator getInterpolator(int id) {
    switch (id) {
        case 0:
            return new LinearInterpolator();
        case 1:
            return new AccelerateInterpolator();
        case 2:
            return new DecelerateInterpolator();
        case 3:
            return new AccelerateDecelerateInterpolator();
        case 4:
            return new OvershootInterpolator();
        case 5:
            return new AnticipateInterpolator();
        case 6:
            return new AnticipateOvershootInterpolator();
        case 7:
            return new BounceInterpolator();
        case 8:
            return new FastOutLinearInInterpolator();
        case 9:
            return new LinearInterpolator();
        case 10:
            return new LinearOutSlowInInterpolator();
        default:
            return new FastOutSlowInInterpolator();
    }
}
 
Example #7
Source File: parent.java    From UltimateRecyclerView with Apache License 2.0 5 votes vote down vote up
@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();
    }
}
 
Example #8
Source File: SliderHeader.java    From UltimateRecyclerView with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #9
Source File: LockPatternView.java    From MHViewer with Apache License 2.0 4 votes vote down vote up
public LockPatternView(Context context, AttributeSet attrs) {
    super(context, attrs);

    //TypedArray a = context.obtainStyledAttributes(attrs, LockPatternView);

    //final String aspect = a.getString(R.styleable.LockPatternView_aspect);

    //if ("square".equals(aspect)) {
    //    mAspect = ASPECT_SQUARE;
    //} else if ("lock_width".equals(aspect)) {
    //    mAspect = ASPECT_LOCK_WIDTH;
    //} else if ("lock_height".equals(aspect)) {
    //    mAspect = ASPECT_LOCK_HEIGHT;
    //} else {
        mAspect = ASPECT_SQUARE;
    //}

    setClickable(true);


    mPathPaint.setAntiAlias(true);
    mPathPaint.setDither(true);

    mRegularColor = getResources().getColor(AttrResources.getAttrBoolean(context, R.attr.isLightTheme) ?
        R.color.lock_pattern_view_regular_color_light : R.color.lock_pattern_view_regular_color_dark);
    mErrorColor = getResources().getColor(R.color.lock_pattern_view_error_color);
    mSuccessColor = getResources().getColor(R.color.lock_pattern_view_success_color);

    int pathColor = mRegularColor;//a.getColor(R.styleable.LockPatternView_pathColor, mRegularColor);
    mPathPaint.setColor(pathColor);

    mPathPaint.setStyle(Paint.Style.STROKE);
    mPathPaint.setStrokeJoin(Paint.Join.ROUND);
    mPathPaint.setStrokeCap(Paint.Cap.ROUND);

    mPathWidth = getResources().getDimensionPixelSize(R.dimen.lock_pattern_dot_line_width);
    mPathPaint.setStrokeWidth(mPathWidth);

    mDotSize = getResources().getDimensionPixelSize(R.dimen.lock_pattern_dot_size);
    mDotSizeActivated = getResources().getDimensionPixelSize(
            R.dimen.lock_pattern_dot_size_activated);

    mPaint.setAntiAlias(true);
    mPaint.setDither(true);

    mCellStates = new CellState[3][3];
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            mCellStates[i][j] = new CellState();
            mCellStates[i][j].size = mDotSize;
        }
    }

    mFastOutSlowInInterpolator = new FastOutSlowInInterpolator();
    mLinearOutSlowInInterpolator = new LinearOutSlowInInterpolator();
}
 
Example #10
Source File: LockPatternView.java    From EhViewer with Apache License 2.0 4 votes vote down vote up
public LockPatternView(Context context, AttributeSet attrs) {
    super(context, attrs);

    //TypedArray a = context.obtainStyledAttributes(attrs, LockPatternView);

    //final String aspect = a.getString(R.styleable.LockPatternView_aspect);

    //if ("square".equals(aspect)) {
    //    mAspect = ASPECT_SQUARE;
    //} else if ("lock_width".equals(aspect)) {
    //    mAspect = ASPECT_LOCK_WIDTH;
    //} else if ("lock_height".equals(aspect)) {
    //    mAspect = ASPECT_LOCK_HEIGHT;
    //} else {
        mAspect = ASPECT_SQUARE;
    //}

    setClickable(true);


    mPathPaint.setAntiAlias(true);
    mPathPaint.setDither(true);

    mRegularColor = getResources().getColor(AttrResources.getAttrBoolean(context, R.attr.isLightTheme) ?
        R.color.lock_pattern_view_regular_color_light : R.color.lock_pattern_view_regular_color_dark);
    mErrorColor = getResources().getColor(R.color.lock_pattern_view_error_color);
    mSuccessColor = getResources().getColor(R.color.lock_pattern_view_success_color);

    int pathColor = mRegularColor;//a.getColor(R.styleable.LockPatternView_pathColor, mRegularColor);
    mPathPaint.setColor(pathColor);

    mPathPaint.setStyle(Paint.Style.STROKE);
    mPathPaint.setStrokeJoin(Paint.Join.ROUND);
    mPathPaint.setStrokeCap(Paint.Cap.ROUND);

    mPathWidth = getResources().getDimensionPixelSize(R.dimen.lock_pattern_dot_line_width);
    mPathPaint.setStrokeWidth(mPathWidth);

    mDotSize = getResources().getDimensionPixelSize(R.dimen.lock_pattern_dot_size);
    mDotSizeActivated = getResources().getDimensionPixelSize(
            R.dimen.lock_pattern_dot_size_activated);

    mPaint.setAntiAlias(true);
    mPaint.setDither(true);

    mCellStates = new CellState[3][3];
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            mCellStates[i][j] = new CellState();
            mCellStates[i][j].size = mDotSize;
        }
    }

    mFastOutSlowInInterpolator = new FastOutSlowInInterpolator();
    mLinearOutSlowInInterpolator = new LinearOutSlowInInterpolator();
}