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) {
|
||||||
RelativeLayout.LayoutParams layoutParams =
|
parent.addView(emptyView);
|
||||||
(RelativeLayout.LayoutParams) emptyView.getLayoutParams();
|
RelativeLayout.LayoutParams layoutParams =
|
||||||
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
|
(RelativeLayout.LayoutParams) emptyView.getLayoutParams();
|
||||||
emptyView.setLayoutParams(layoutParams);
|
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
|
||||||
|
emptyView.setLayoutParams(layoutParams);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
parent = (ViewGroup) parent.getParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue