简体   繁体   English

如何增加 SwipeRefreshLayout 中的向下拖动量?

[英]How can I increase the amount of drag down in SwipeRefreshLayout?

I have one SwipeRefreshLayout and I want to increase the amount of drag down.我有一个 SwipeRefreshLayout,我想增加向下拖动的量。 How can I do this?我怎样才能做到这一点?

val dp = 100
swipeRefreshLayout.setDistanceToTriggerSync(dp)

public void setDistanceToTriggerSync (int distance)
Set the distance to trigger a sync in dips

You can use setProgressViewOffset method.您可以使用setProgressViewOffset方法。 eg例如

val offset: Int = 70 //you can set value according to your requirement
swipeRefreshLayout.setProgressViewOffset(false, 0, offset)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM