本文整理汇总了Java中com.wunderlist.slidinglayer.SlidingLayer.STICK_TO_BOTTOM属性的典型用法代码示例。如果您正苦于以下问题:Java SlidingLayer.STICK_TO_BOTTOM属性的具体用法?Java SlidingLayer.STICK_TO_BOTTOM怎么用?Java SlidingLayer.STICK_TO_BOTTOM使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.wunderlist.slidinglayer.SlidingLayer
的用法示例。
在下文中一共展示了SlidingLayer.STICK_TO_BOTTOM属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 };
}
}
示例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 };
}
}
示例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 };
}
}