Comments (6)
不明白 "最后return了swiperefreshlayout",LoadingLayout.wrap返回的是LoadingLayout类型
wrap后有没有调用showXX?
我这边使用正常
from loadinglayout.
我Fragment的布局结构如下:
<SwipeRefreshLayout >
<ListView />
</SwipeRefreshLayout>
然后我用LoadingLayout.wrap(View view)方法传入了ListView,在onCreateView最后returnSwipeRefreshLayout,调用了showXXX方法了,但是还是没有效果,我的Fragment是Viewpager中的一个子项,我开始用的LoadingLayout.wrap(Fragment fragment)直接传入了fragment,但是在该方法中的fragment.getParent()返回了null崩溃,所以用了上一个方法
from loadinglayout.
LoadingLayout.wrap(Fragment fragment) 实际上是wrap(fragment.getView())
传入的view必须已经添加到布局中,也就是view.getParent()不能为null
你可以看下wrap源码,代码并不多
我在demo里添加了SwipeRefreshLayout+RecyclerView的例子,你试试看
from loadinglayout.
谢谢了,我看过源码的,直接使用swiperefreshlayout+RecyclerView应该是没有问题的,我的fragment是在viewpager里面的,这样貌似就有问题了哦
from loadinglayout.
是有这个问题的,在Viewpager中使用,就显示不出来,我觉得可能是viewpager的预加载的原因造成的
from loadinglayout.
我的是用的 swiperefreshlayout+listview,有多天数据的时候无法上下滑动,跟上啦加载,下啦刷新冲突了,可是demo上的不冲突,为啥
from loadinglayout.
Related Issues (20)
- 能否提供各布局的get() 方法? HOT 4
- 布局在XML中使用的话?用ButterKnife就会报错? HOT 3
- fragment 显示空白的补救措施~
- 这种实现会增加布局层级 HOT 1
- Fragment 内用LoadingLayout 报错
- 希望内容布局也可以动态添加
- 不知道为什么,showError之前要先设置icon,不然会报错 HOT 1
- 图片如何自己设置大小?
- 不能嵌套webview? HOT 1
- 嵌套webview 然后webview不能播放视频
- 能单独设置特殊页面的页面状态么 HOT 2
- 最近在使用过程中发现总是获取不到loadinglayout报空的错误
- bug
- 我在 Fragment 中使用发现布局不能在页面居中,只会在头部水平居中 HOT 1
- 不可以放在BaseActivity里面做统一设置的吗? HOT 1
- BaseActivity里面做统一设置应该传什么呢 HOT 3
- 自定义加载动画
- 在fragment中有问题 HOT 1
- 能不设置默认显示布局?(在XML中)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loadinglayout.