We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b1aef2 commit e10106bCopy full SHA for e10106b
1 file changed
library/src/com/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase.java
@@ -191,7 +191,12 @@ public final void setEmptyView(View newEmptyView) {
191
192
// We need to convert any LayoutParams so that it works in our
193
// FrameLayout
194
- refreshableViewWrapper.addView(newEmptyView, convertEmptyViewLayoutParams(newEmptyView.getLayoutParams()));
+ FrameLayout.LayoutParams lp = convertEmptyViewLayoutParams(newEmptyView.getLayoutParams());
195
+ if (null != lp) {
196
+ refreshableViewWrapper.addView(newEmptyView, lp);
197
+ } else {
198
+ refreshableViewWrapper.addView(newEmptyView);
199
+ }
200
}
201
202
if (mRefreshableView instanceof EmptyViewMethodAccessor) {
0 commit comments