Skip to content

Commit

Permalink
1.修复PageStateLayout导致的崩溃问题
Browse files Browse the repository at this point in the history
  • Loading branch information
keep2iron committed Feb 27, 2019
1 parent d9d0aab commit b461ba9
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ class PageStateLayout constructor(context: Context, attrs: AttributeSet? = null)
var mNoDataView: View? = null
set(value) {
field = value
val noDataView = views[PageState.NO_DATA]
if (noDataView != null) {
removeView(noDataView)
}
addView(value, 0)
views[PageState.NO_DATA] = value
}
/**
Expand All @@ -50,11 +45,6 @@ class PageStateLayout constructor(context: Context, attrs: AttributeSet? = null)
var mNoNetwork: View? = null
set(value) {
field = value
val noNetworkView = views[PageState.NO_NETWORK]
if (noNetworkView != null) {
removeView(noNetworkView)
}
addView(value, 0)
views[PageState.NO_NETWORK] = value
}
/**
Expand All @@ -63,11 +53,6 @@ class PageStateLayout constructor(context: Context, attrs: AttributeSet? = null)
var mLoadError: View? = null
set(value) {
field = value
val loadErrorView = views[PageState.LOAD_ERROR]
if (loadErrorView != null) {
removeView(loadErrorView)
}
addView(value, 0)
views[PageState.LOAD_ERROR] = value
}
/**
Expand All @@ -76,11 +61,6 @@ class PageStateLayout constructor(context: Context, attrs: AttributeSet? = null)
var mLoadingView: View? = null
set(value) {
field = value
val loadingView = views[PageState.LOADING]
if (loadingView != null) {
removeView(loadingView)
}
addView(value, 0)
views[PageState.LOADING] = value
}

Expand Down

0 comments on commit b461ba9

Please sign in to comment.