Android 编程下如何调整 SwipeRefreshLayout 的下拉刷新距离
1个回答
展开全部
下面的代码展示了源码中是如何给这个变量赋值的:
final DisplayMetrics metrics = getResources().getDisplayMetrics();mDistanceToTriggerSync = (int) Math.min(((View) getParent()).getHeight() * MAX_SWIPE_DISTANCE_FACTOR, REFRESH_TRIGGER_DISTANCE * metrics.density);
final DisplayMetrics metrics = getResources().getDisplayMetrics();mDistanceToTriggerSync = (int) Math.min(((View) getParent()).getHeight() * MAX_SWIPE_DISTANCE_FACTOR, REFRESH_TRIGGER_DISTANCE * metrics.density);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询