add some null checks at search closing/opening

This commit is contained in:
tibbi 2018-02-08 12:56:19 +01:00
parent 712dce12c7
commit fff380dd92

View file

@ -111,14 +111,14 @@ class SongAdapter(activity: SimpleActivity, var songs: ArrayList<Song>, val list
fun searchOpened() {
transparentViewHeight = transparentView.height
transparentView.layoutParams.height = 0
transparentView.layoutParams?.height = 0
navigationViewHeight = navigationView?.height ?: 0
navigationView?.layoutParams?.height = 0
}
fun searchClosed() {
transparentView.layoutParams.height = transparentViewHeight
transparentView.layoutParams?.height = transparentViewHeight
navigationView?.layoutParams?.height = navigationViewHeight
notifyDataSetChanged()
}