Fixed episodes page no longer shows empty view (#4573)
This commit is contained in:
parent
885362e5eb
commit
15ba3f8f60
|
@ -84,12 +84,16 @@ public class EmptyViewHandler {
|
||||||
|
|
||||||
private void addToParentView(View view) {
|
private void addToParentView(View view) {
|
||||||
ViewGroup parent = ((ViewGroup) view.getParent());
|
ViewGroup parent = ((ViewGroup) view.getParent());
|
||||||
parent.addView(emptyView);
|
while (parent != null) {
|
||||||
if (parent instanceof RelativeLayout) {
|
if (parent instanceof RelativeLayout) {
|
||||||
|
parent.addView(emptyView);
|
||||||
RelativeLayout.LayoutParams layoutParams =
|
RelativeLayout.LayoutParams layoutParams =
|
||||||
(RelativeLayout.LayoutParams) emptyView.getLayoutParams();
|
(RelativeLayout.LayoutParams) emptyView.getLayoutParams();
|
||||||
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
|
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
|
||||||
emptyView.setLayoutParams(layoutParams);
|
emptyView.setLayoutParams(layoutParams);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
parent = (ViewGroup) parent.getParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue