本文整理汇总了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;
}
示例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 };
}
}
示例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 };
}
}
示例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 };
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
示例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();
}
}
}