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


Java SlidingLayer.STICK_TO_TOP属性代码示例

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


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

示例1: pivotPositionForScreenSide

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,代码行数:20,代码来源:RotationTransformer.java

示例2: rotationValueForScreenSide

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,代码行数:20,代码来源:SlideJoyTransformer.java

示例3: pivotPositionForScreenSide

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,代码行数:20,代码来源:SlideJoyTransformer.java

示例4: onMeasure

@Override
protected void onMeasure(View layerView, int screenSide) {

    final int[] pivotPosition = pivotPositionForScreenSide(layerView, screenSide);
    layerView.setPivotX(pivotPosition[0]);
    layerView.setPivotY(pivotPosition[1]);

    mAngle = mMaxAngle *
            (screenSide == SlidingLayer.STICK_TO_LEFT || screenSide == SlidingLayer.STICK_TO_TOP ? -1 : 1);
}
 
开发者ID:ITsvetkoFF,项目名称:Kv-009,代码行数:10,代码来源:RotationTransformer.java


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