当前位置: 首页>>代码示例>>Java>>正文


Java SlidingLayer类代码示例

本文整理汇总了Java中com.wunderlist.slidinglayer.SlidingLayer的典型用法代码示例。如果您正苦于以下问题:Java SlidingLayer类的具体用法?Java SlidingLayer怎么用?Java SlidingLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SlidingLayer类属于com.wunderlist.slidinglayer包,在下文中一共展示了SlidingLayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View view = inflater.inflate(R.layout.fragment_slidinglayer, container, false);

    slidingLayerLeft = (SlidingLayer) view.findViewById(R.id.fs_slidinglayer_left);
    slidingLayerTop = (SlidingLayer) view.findViewById(R.id.fs_slidinglayer_top);
    slidingLayerRight = (SlidingLayer) view.findViewById(R.id.fs_slidinglayer_right);
    slidingLayerBottom = (SlidingLayer) view.findViewById(R.id.fs_slidinglayer_bottom);

    slidingLayerLeft.setLayerTransformer(new RotationTransformer());
    slidingLayerRight.setLayerTransformer(new RotationTransformer());
    slidingLayerTop.setLayerTransformer(new SlideJoyTransformer());
    slidingLayerBottom.setLayerTransformer(new SlideJoyTransformer());

    view.post(new Runnable() {
        @Override
        public void run() {
            slidingLayerLeft.closeLayer(false);
            slidingLayerRight.closeLayer(false);
        }
    });

    return view;
}
 
开发者ID:JlUgia,项目名称:beauty-treatment-android-animations,代码行数:27,代码来源:SlidingLayerFragment.java

示例2: pivotPositionForScreenSide

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
private int[] pivotPositionForScreenSide(View layerView, int screenSide) {

        switch (screenSide) {

        case SlidingLayer.STICK_TO_LEFT:
            return new int[] { 0, layerView.getMeasuredHeight() };

        case SlidingLayer.STICK_TO_TOP:
            return new int[] { 0, 0 };

        case SlidingLayer.STICK_TO_RIGHT:
            return new int[] { layerView.getMeasuredWidth(), layerView.getMeasuredHeight() };

        case SlidingLayer.STICK_TO_BOTTOM:
            return new int[] { 0, layerView.getMeasuredHeight() };

        default:
            return new int[] { 0, 0 };
        }
    }
 
开发者ID:ITsvetkoFF,项目名称:Kv-009,代码行数:21,代码来源:RotationTransformer.java

示例3: rotationValueForScreenSide

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
private float[] rotationValueForScreenSide(float value, int screenSide) {

        switch (screenSide) {

        case SlidingLayer.STICK_TO_LEFT:
            return new float[] { 0, value };

        case SlidingLayer.STICK_TO_TOP:
            return new float[] { -value, 0 };

        case SlidingLayer.STICK_TO_RIGHT:
            return new float[] { 0, -value };

        case SlidingLayer.STICK_TO_BOTTOM:
            return new float[] { value, 0 };

        default:
            return new float[] { 0, 0 };
        }
    }
 
开发者ID:ITsvetkoFF,项目名称:Kv-009,代码行数:21,代码来源:SlideJoyTransformer.java

示例4: pivotPositionForScreenSide

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
private int[] pivotPositionForScreenSide(View layerView, int screenSide) {

        switch (screenSide) {

        case SlidingLayer.STICK_TO_LEFT:
            return new int[] { 0, layerView.getMeasuredHeight() / 2 };

        case SlidingLayer.STICK_TO_TOP:
            return new int[] { layerView.getMeasuredWidth() / 2, 0 };

        case SlidingLayer.STICK_TO_RIGHT:
            return new int[] { layerView.getMeasuredWidth(), layerView.getMeasuredHeight() / 2 };

        case SlidingLayer.STICK_TO_BOTTOM:
            return new int[] { layerView.getMeasuredWidth() / 2, layerView.getMeasuredHeight() };

        default:
            return new int[] { 0, 0 };
        }
    }
 
开发者ID:ITsvetkoFF,项目名称:Kv-009,代码行数:21,代码来源:SlideJoyTransformer.java

示例5: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
    {

        ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
        //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

        if(slidingLayer!=null) {
            slidingLayer.setChangeStateOnTap(true);
            slidingLayer.setSlidingEnabled(true);
            slidingLayer.setPreviewOffsetDistance(15);
            slidingLayer.setOffsetDistance(10);
            slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

//            DisplayMetrics metrics = new DisplayMetrics();
//            getWindowManager().getDefaultDisplay().getMetrics(metrics);

            //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

            //slidingContents.setLayoutParams(layoutParams);

            //slidingContents.setMinimumWidth(metrics.widthPixels-50);


            if (getSupportFragmentManager().findFragmentByTag(TAG_SLIDING_LAYER)==null)
            {
                getSupportFragmentManager()
                        .beginTransaction()
                        .add(R.id.slidinglayerfragment,new SlidingLayerSortOrdersHD(),TAG_SLIDING_LAYER)
                        .commit();
            }
        }
    }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-Distributor-Android-app,代码行数:33,代码来源:DeliveryGuyDashboard.java

示例6: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
    {

        ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
        //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

        if(slidingLayer!=null) {
            slidingLayer.setChangeStateOnTap(true);
            slidingLayer.setSlidingEnabled(true);
            slidingLayer.setPreviewOffsetDistance(15);
            slidingLayer.setOffsetDistance(10);
            slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

//            DisplayMetrics metrics = new DisplayMetrics();
//            getWindowManager().getDefaultDisplay().getMetrics(metrics);

            //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

            //slidingContents.setLayoutParams(layoutParams);

            //slidingContents.setMinimumWidth(metrics.widthPixels-50);


            if (getSupportFragmentManager().findFragmentByTag(TAG_SLIDING_LAYER)==null)
            {
                getSupportFragmentManager()
                        .beginTransaction()
                        .add(R.id.slidinglayerfragment,new SlidingLayerSortOrdersPFS(),TAG_SLIDING_LAYER)
                        .commit();
            }

        }
    }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-Distributor-Android-app,代码行数:34,代码来源:CancelledOrdersPFS.java

示例7: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
    {

        ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
        //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

        if(slidingLayer!=null) {
            slidingLayer.setChangeStateOnTap(true);
            slidingLayer.setSlidingEnabled(true);
            slidingLayer.setPreviewOffsetDistance(15);
            slidingLayer.setOffsetDistance(10);
            slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

//            DisplayMetrics metrics = new DisplayMetrics();
//            getWindowManager().getDefaultDisplay().getMetrics(metrics);

            //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

            //slidingContents.setLayoutParams(layoutParams);

            //slidingContents.setMinimumWidth(metrics.widthPixels-50);


            if (getSupportFragmentManager().findFragmentByTag(TAG_SLIDING_LAYER)==null)
            {
                getSupportFragmentManager()
                        .beginTransaction()
                        .add(R.id.slidinglayerfragment,new SlidingLayerSortServices(),TAG_SLIDING_LAYER)
                        .commit();
            }

        }
    }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-Distributor-Android-app,代码行数:34,代码来源:ServicesActivity.java

示例8: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
    {

        ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
        //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

        if(slidingLayer!=null)
        {
            slidingLayer.setChangeStateOnTap(true);
            slidingLayer.setSlidingEnabled(true);
//            slidingLayer.setPreviewOffsetDistance(15);
            slidingLayer.setOffsetDistance(30);
            slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

            DisplayMetrics metrics = new DisplayMetrics();
            getWindowManager().getDefaultDisplay().getMetrics(metrics);

            //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

            //slidingContents.setLayoutParams(layoutParams);

            //slidingContents.setMinimumWidth(metrics.widthPixels-50);


            if(getSupportFragmentManager().findFragmentByTag(TAG_SLIDING)==null)
            {
                System.out.println("Item Cat Simple : New Sliding Layer Loaded !");
                getSupportFragmentManager()
                        .beginTransaction()
                        .replace(R.id.slidinglayerfragment,new SlidingLayerSortItemsInStock(),TAG_SLIDING)
                        .commit();
            }
        }

    }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-Distributor-Android-app,代码行数:36,代码来源:ItemsInStockByCat.java

示例9: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
{

    ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
    //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

    if(slidingLayer!=null)
    {
        slidingLayer.setChangeStateOnTap(true);
        slidingLayer.setSlidingEnabled(true);
        slidingLayer.setPreviewOffsetDistance(15);
        slidingLayer.setOffsetDistance(10);
        slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

        DisplayMetrics metrics = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(metrics);

        //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

        //slidingContents.setLayoutParams(layoutParams);

        //slidingContents.setMinimumWidth(metrics.widthPixels-50);


        getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.slidinglayerfragment,new SlidingLayerEditStock())
                .commit();

    }

}
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-Distributor-Android-app,代码行数:33,代码来源:EditStock.java

示例10: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
{

    ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
    //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

    if(slidingLayer!=null)
    {
        slidingLayer.setChangeStateOnTap(true);
        slidingLayer.setSlidingEnabled(true);
        slidingLayer.setPreviewOffsetDistance(15);
        slidingLayer.setOffsetDistance(10);
        slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

        DisplayMetrics metrics = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(metrics);

        //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

        //slidingContents.setLayoutParams(layoutParams);

        //slidingContents.setMinimumWidth(metrics.widthPixels-50);


        getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.slidinglayerfragment,new SlidingLayerItemSort())
                .commit();

    }

}
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-Distributor-Android-app,代码行数:33,代码来源:ItemCategoriesTabs.java

示例11: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
{

    ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
    //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

    if(slidingLayer!=null)
    {
        slidingLayer.setChangeStateOnTap(true);
        slidingLayer.setSlidingEnabled(true);
        slidingLayer.setPreviewOffsetDistance(20);
        slidingLayer.setOffsetDistance(10);
        slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

        DisplayMetrics metrics = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(metrics);

        //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

        //slidingContents.setLayoutParams(layoutParams);

        //slidingContents.setMinimumWidth(metrics.widthPixels-50);


        if(getSupportFragmentManager().findFragmentByTag(TAG_SLIDING)==null)
        {
            System.out.println("Item Cat Simple : New Sliding Layer Loaded !");
            getSupportFragmentManager()
                    .beginTransaction()
                    .replace(R.id.slidinglayerfragment,new SlidingLayerSortItems(),TAG_SLIDING)
                    .commit();
        }
    }

}
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-Distributor-Android-app,代码行数:36,代码来源:ItemsByCatSimple.java

示例12: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
    {

        ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
        //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

        if(slidingLayer!=null)
        {
            slidingLayer.setChangeStateOnTap(true);
            slidingLayer.setSlidingEnabled(true);
//            slidingLayer.setPreviewOffsetDistance(15);
            slidingLayer.setOffsetDistance(30);
            slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

            DisplayMetrics metrics = new DisplayMetrics();
            getWindowManager().getDefaultDisplay().getMetrics(metrics);

            //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

            //slidingContents.setLayoutParams(layoutParams);

            //slidingContents.setMinimumWidth(metrics.widthPixels-50);


            if(getSupportFragmentManager().findFragmentByTag(TAG_SLIDING)==null)
            {
                System.out.println("Item Cat Simple : New Sliding Layer Loaded !");
                getSupportFragmentManager()
                        .beginTransaction()
                        .replace(R.id.slidinglayerfragment,new SlidingLayerSortItems(),TAG_SLIDING)
                        .commit();
            }
        }
    }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-Distributor-Android-app,代码行数:35,代码来源:ItemsTypeSimple.java

示例13: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
    {

        ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
        //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

        if(slidingLayer!=null) {
            slidingLayer.setChangeStateOnTap(true);
            slidingLayer.setSlidingEnabled(true);
            slidingLayer.setPreviewOffsetDistance(15);
            slidingLayer.setOffsetDistance(10);
            slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

//            DisplayMetrics metrics = new DisplayMetrics();
//            getWindowManager().getDefaultDisplay().getMetrics(metrics);

            //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

            //slidingContents.setLayoutParams(layoutParams);

            //slidingContents.setMinimumWidth(metrics.widthPixels-50);


            if (getSupportFragmentManager().findFragmentByTag(TAG_SLIDING_LAYER)==null)
            {
                getSupportFragmentManager()
                        .beginTransaction()
                        .add(R.id.slidinglayerfragment,new SlidingLayerSortOrdersHD(),TAG_SLIDING_LAYER)
                        .commit();
            }

        }
    }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-End-User-Android-app,代码行数:34,代码来源:OrderHistoryHD.java

示例14: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
{

    ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
    //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

    if(slidingLayer!=null)
    {
        slidingLayer.setChangeStateOnTap(true);
        slidingLayer.setSlidingEnabled(true);
        slidingLayer.setPreviewOffsetDistance(15);
        slidingLayer.setOffsetDistance(10);
        slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

        DisplayMetrics metrics = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(metrics);

        //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

        //slidingContents.setLayoutParams(layoutParams);

        //slidingContents.setMinimumWidth(metrics.widthPixels-50);


        getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.slidinglayerfragment,new SlidingLayerSortReview())
                .commit();

    }

}
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-End-User-Android-app,代码行数:33,代码来源:ShopReviews.java

示例15: setupSlidingLayer

import com.wunderlist.slidinglayer.SlidingLayer; //导入依赖的package包/类
void setupSlidingLayer()
    {

        ////slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
        //slidingLayer.setShadowSizeRes(R.dimen.shadow_size);

        if(slidingLayer!=null)
        {
            slidingLayer.setChangeStateOnTap(true);
            slidingLayer.setSlidingEnabled(true);
//            slidingLayer.setPreviewOffsetDistance(15);
            slidingLayer.setOffsetDistance(30);
            slidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT);

            DisplayMetrics metrics = new DisplayMetrics();
            getWindowManager().getDefaultDisplay().getMetrics(metrics);

            //RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(250, ViewGroup.LayoutParams.MATCH_PARENT);

            //slidingContents.setLayoutParams(layoutParams);

            //slidingContents.setMinimumWidth(metrics.widthPixels-50);



            if(getSupportFragmentManager().findFragmentByTag(TAG_SLIDING_LAYER)==null)
            {
                getSupportFragmentManager()
                        .beginTransaction()
                        .add(R.id.slidinglayerfragment,new SlidingLayerSortItemsInShop(),TAG_SLIDING_LAYER)
                        .commit();
            }
        }

    }
 
开发者ID:SumeetMoray,项目名称:Nearby-Shops-End-User-Android-app,代码行数:36,代码来源:ItemsInShop.java


注:本文中的com.wunderlist.slidinglayer.SlidingLayer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。