public void setDrawerLeftEdgeSize(DrawerLayout drawerLayout, float displayWidthPercentage) { if (drawerLayout == null) return; try { // find ViewDragHelper and set it accessible Field leftDraggerField = drawerLayout.getClass().getDeclaredField("mLeft
package com.lvshandian.menshen.view;/** * Created by zhang on 2016/11/8. * 创建自定义滑动,禁止滑动的ViewPager */import android.content.Context;import android.support.v4.view.ViewPager;import android.util.AttributeSet;import android.view.MotionEvent;public class
遇到如下问题:viewpager滑动时如果想跳过很多条直接到最后一条,中间会黑屏.黑屏是因为中间的view没有加载出来的缘故. stackOverflow上看到的解决方案,在这里记录一下, public class FixedScroller extends Scroller { private int mDuration = 500; public FixedScroller(Context context) { super(context); } public Fix