SwipeRevealLayout
SwipeRevealLayout copied to clipboard
On orientation change there is gap for some of the list items .
I am also facing same issue
I got the solution. You guys have to override onConfigurationChanged in the fragment and re initialize the recycler view(no list data) in the onConfigurationChanged method, this will solve the problem.
Example===> override fun onConfigurationChanged(newConfig: Configuration?) { super.onConfigurationChanged(newConfig) handleScreenOrientation() }
/** * This will set up the recycler view */ private fun handleScreenOrientation() { mLayoutManager = LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false) recycler_view_rep_team.layoutManager = mLayoutManager
activity?.let {
mRepTeamAdapter = RepTeamAdapter(it, mReapTeamList,
this,
this,
this,
this)
recycler_view_rep_team.adapter = mRepTeamAdapter
}
}
any solution? I'm getting frustated for this
I too faced this issue and solved it by handling onConfigurationChanged(Configuration newConfig)
event and resetting the adapter