Search in sources :

Example 1 with SweetView

use of com.mingle.widget.SweetView in project AndroidSweetSheet by zzz40500.

the class ViewPagerDelegate method createView.

@Override
protected View createView() {
    View rootView = LayoutInflater.from(mParentVG.getContext()).inflate(R.layout.layout_vp_sweet, null, false);
    mSweetView = (SweetView) rootView.findViewById(R.id.sv);
    mFreeGrowUpParentRelativeLayout = (FreeGrowUpParentRelativeLayout) rootView.findViewById(R.id.freeGrowUpParentF);
    mIndicatorView = (IndicatorView) rootView.findViewById(R.id.indicatorView);
    mIndicatorView.alphaDismiss(false);
    mSweetView.setAnimationListener(new AnimationImp());
    mViewPager = (ViewPager) rootView.findViewById(R.id.vp);
    if (mContentViewHeight > 0) {
        mFreeGrowUpParentRelativeLayout.setContentHeight(mContentViewHeight);
    }
    return rootView;
}
Also used : SweetView(com.mingle.widget.SweetView) IndicatorView(com.mingle.widget.IndicatorView) View(android.view.View)

Example 2 with SweetView

use of com.mingle.widget.SweetView in project AndroidSweetSheet by zzz40500.

the class CustomDelegate method createView.

@Override
public View createView() {
    View rootView = LayoutInflater.from(mParentVG.getContext()).inflate(R.layout.layout_custom_sweet, null, false);
    mSweetView = (SweetView) rootView.findViewById(R.id.sv);
    mSweetView.setSweetSheetColor(sweetSheetColor);
    mFreeGrowUpParentRelativeLayout = (FreeGrowUpParentRelativeLayout) rootView.findViewById(R.id.freeGrowUpParentF);
    mContentRL = (RelativeLayout) rootView.findViewById(R.id.rl);
    sliderIm = (CRImageView) rootView.findViewById(R.id.sliderIM);
    mSweetView.setAnimationListener(new AnimationImp());
    if (mContentView != null) {
        mContentRL.removeAllViews();
        mContentRL.addView(mContentView);
    }
    if (mContentViewAnimationType == AnimationType.DuangLayoutAnimation) {
        mAnimationView = null;
        if (mContentView instanceof ViewGroup) {
            mAnimationView = (ViewGroup) mContentView;
        } else {
            mAnimationView = mContentRL;
        }
        Animation animation = AnimationUtils.loadAnimation(mContentRL.getContext(), R.anim.item_duang_show);
        LayoutAnimationController layoutAnimationController = new LayoutAnimationController(animation);
        layoutAnimationController.setDelay(0.1f);
        mAnimationView.setLayoutAnimation(layoutAnimationController);
    }
    if (mContentViewHeight > 0) {
        mFreeGrowUpParentRelativeLayout.setContentHeight(mContentViewHeight);
    }
    return rootView;
}
Also used : ViewGroup(android.view.ViewGroup) LayoutAnimationController(android.view.animation.LayoutAnimationController) Animation(android.view.animation.Animation) SweetView(com.mingle.widget.SweetView) CRImageView(com.mingle.widget.CRImageView) View(android.view.View)

Example 3 with SweetView

use of com.mingle.widget.SweetView in project AndroidSweetSheet by zzz40500.

the class RecyclerViewDelegate method createView.

@Override
protected View createView() {
    View rootView = LayoutInflater.from(mParentVG.getContext()).inflate(R.layout.layout_rv_sweet, null, false);
    mSweetView = (SweetView) rootView.findViewById(R.id.sv);
    mFreeGrowUpParentRelativeLayout = (FreeGrowUpParentRelativeLayout) rootView.findViewById(R.id.freeGrowUpParentF);
    mRV = (RecyclerView) rootView.findViewById(R.id.rv);
    sliderIm = (CRImageView) rootView.findViewById(R.id.sliderIM);
    mRV.setLayoutManager(new LinearLayoutManager(mParentVG.getContext(), LinearLayoutManager.VERTICAL, false));
    mSweetView.setAnimationListener(new AnimationImp());
    if (mContentViewHeight > 0) {
        mFreeGrowUpParentRelativeLayout.setContentHeight(mContentViewHeight);
    }
    return rootView;
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) SweetView(com.mingle.widget.SweetView) RecyclerView(android.support.v7.widget.RecyclerView) CRImageView(com.mingle.widget.CRImageView) View(android.view.View) AdapterView(android.widget.AdapterView)

Aggregations

View (android.view.View)3 SweetView (com.mingle.widget.SweetView)3 CRImageView (com.mingle.widget.CRImageView)2 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 ViewGroup (android.view.ViewGroup)1 Animation (android.view.animation.Animation)1 LayoutAnimationController (android.view.animation.LayoutAnimationController)1 AdapterView (android.widget.AdapterView)1 IndicatorView (com.mingle.widget.IndicatorView)1