Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* Email:kingjavip@gmail.com
*/
public abstract class Callback implements Serializable {
private View rootView;
private Context context;
private transient View rootView;
private transient Context context;
private OnReloadListener onReloadListener;
private boolean successViewVisible;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ public LoadLayout replaceView(Object target, Callback.OnReloadListener onReloadL
View oldContent = (android.view.View) target;
ViewGroup contentParent = (ViewGroup) (oldContent.getParent());
int childIndex = 0;
int childCount = contentParent == null ? 0 : contentParent.getChildCount();
for (int i = 0; i < childCount; i++) {
if (contentParent.getChildAt(i) == oldContent) {
childIndex = i;
break;
}
}
if (contentParent != null) {
childIndex = contentParent.indexOfChild(oldContent);
contentParent.removeView(oldContent);
}
ViewGroup.LayoutParams oldLayoutParams = oldContent.getLayoutParams();
Expand Down