Skip to content

Commit 2f409c0

Browse files
committed
refactor: handle configuration changes with onResume
1 parent d2036ab commit 2f409c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/com/itsaky/androidide/fragments/TemplateListFragment.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ class TemplateListFragment :
9696
updateSpanCount()
9797
}
9898

99+
override fun onResume() {
100+
super.onResume()
101+
updateSpanCount()
102+
}
103+
99104
private fun updateSpanCount() {
100105
val isLandscape = resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE
101106
val maxSpans = if (isLandscape) 6 else 4

0 commit comments

Comments
 (0)