fix: stats hardware acceleration glitch

This commit is contained in:
rebelonion 2024-03-17 21:59:21 -05:00
parent 9f4cd0ba0d
commit 92fa0c117d
4 changed files with 5 additions and 3 deletions

View file

@ -34,6 +34,7 @@ class ChartItem(
) {
}
}
binding.chartView.setLayerType(View.LAYER_TYPE_SOFTWARE, null)
binding.chartView.callBack = callback
binding.chartView.reload()
binding.chartView.aa_drawChartWithChartOptions(aaOptions)

View file

@ -51,10 +51,9 @@ class StatsFragment :
user = arguments?.getSerializable("user") as Query.UserProfile
binding.statisticList.adapter = adapter
binding.statisticList.setHasFixedSize(true)
binding.statisticList.recycledViewPool.setMaxRecycledViews(0, 0)
binding.statisticList.isNestedScrollingEnabled = true
binding.statisticList.layoutManager = LinearLayoutManager(requireContext())
binding.statisticList.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
binding.statisticProgressBar.visibility = View.VISIBLE
binding.compare.visibility = if (user.id == Anilist.userid) View.GONE else View.VISIBLE
binding.filterContainer.updateLayoutParams<ViewGroup.MarginLayoutParams> { topMargin = statusBarHeight }