SwipeRevealLayout icon indicating copy to clipboard operation
SwipeRevealLayout copied to clipboard

On orientation change there is gap for some of the list items .

Open JyotiDubey opened this issue 7 years ago • 4 comments

JyotiDubey avatar Jul 12 '17 13:07 JyotiDubey

I am also facing same issue

Brajendra avatar Jan 29 '18 16:01 Brajendra

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

    }

}

Shivam1789 avatar May 31 '18 05:05 Shivam1789

any solution? I'm getting frustated for this

vegapunk1209 avatar Oct 15 '18 01:10 vegapunk1209

I too faced this issue and solved it by handling onConfigurationChanged(Configuration newConfig) event and resetting the adapter

RayyanTahir avatar Mar 15 '19 12:03 RayyanTahir