Skip to content

Commit e10106b

Browse files
author
Chris Banes
committed
Fix bug caused by 8b1aef2
1 parent 8b1aef2 commit e10106b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

library/src/com/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ public final void setEmptyView(View newEmptyView) {
191191

192192
// We need to convert any LayoutParams so that it works in our
193193
// FrameLayout
194-
refreshableViewWrapper.addView(newEmptyView, convertEmptyViewLayoutParams(newEmptyView.getLayoutParams()));
194+
FrameLayout.LayoutParams lp = convertEmptyViewLayoutParams(newEmptyView.getLayoutParams());
195+
if (null != lp) {
196+
refreshableViewWrapper.addView(newEmptyView, lp);
197+
} else {
198+
refreshableViewWrapper.addView(newEmptyView);
199+
}
195200
}
196201

197202
if (mRefreshableView instanceof EmptyViewMethodAccessor) {

0 commit comments

Comments
 (0)