diff --git a/app/src/main/java/com/quillstudios/pokegoalshelper/ui/HistoryAdapter.kt b/app/src/main/java/com/quillstudios/pokegoalshelper/ui/HistoryAdapter.kt index e404b78..f14661c 100644 --- a/app/src/main/java/com/quillstudios/pokegoalshelper/ui/HistoryAdapter.kt +++ b/app/src/main/java/com/quillstudios/pokegoalshelper/ui/HistoryAdapter.kt @@ -180,14 +180,23 @@ class HistoryAdapter( private fun createExpandedContent(context: Context): View { return ScrollView(context).apply { + // Calculate max height as 60% of screen height for better scrolling + val displayMetrics = context.resources.displayMetrics + val maxHeight = (displayMetrics.heightPixels * 0.6).toInt() + layoutParams = LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, - dpToPx(context, 300) // Max height for expanded content + maxHeight ) + // Enable proper scrolling behavior + isFillViewport = true + isScrollbarFadingEnabled = false + scrollBarStyle = View.SCROLLBARS_INSIDE_OVERLAY + val contentContainer = LinearLayout(context).apply { orientation = LinearLayout.VERTICAL - setPadding(0, dpToPx(context, 8), 0, 0) + setPadding(0, dpToPx(context, 8), 0, dpToPx(context, 16)) // Add bottom padding for scroll tag = "expanded_container" }