Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
czh235285 committed Jun 17, 2020
1 parent 2a6a41d commit ef9bb60
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions app/src/main/java/com/czh/adapter/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ class MainActivity : AppCompatActivity() {
}
}
rcv.adapter = adapter
adapter.IsNoMore=true
SkeletonTestUI().also {
val view = it.createView(AnkoContext.create(this@MainActivity))
it.tv.text = "没有更多"
adapter.setNoMoreView(view)
}
tv1.setOnClickListener {
adapter.replaceData(null)
}
Expand All @@ -48,7 +42,7 @@ class MainActivity : AppCompatActivity() {
SkeletonTestUI().also {
val view = it.createView(AnkoContext.create(this@MainActivity))
it.tv.text = "尾部"
adapter.addFooterView(view)
adapter.addHeaderView(view)
}
}
tv4.setOnClickListener {
Expand All @@ -58,8 +52,7 @@ class MainActivity : AppCompatActivity() {
adapter.removeAllHeaderView()
}
tv6.setOnClickListener {
// adapter.removeAllFooterView()
adapter.IsNoMore=!adapter.IsNoMore
adapter.removeAllFooterView()
}


Expand Down

0 comments on commit ef9bb60

Please sign in to comment.