https://kotlinlang.org logo
#splitties
Title
# splitties
m

miha-x64

07/28/2020, 9:00 PM
Why do you need an XML layout (which prevents shrinking) and why
Context.recyclerView()
and
View.recyclerView()
have different behaviour? https://github.com/LouisCAD/Splitties/blob/8782cbb5d039a553ed2c5cf795eb53a86146ce91/modules/views-dsl-recyclerview/src/androidMain/kotlin/splitties/views/dsl/recyclerview/RecyclerView.kt#L27
l

louiscad

07/30/2020, 5:22 AM
Because enabling scrollbars is only possible from xml. And NO, there's no different behavior between extensions for
Context
and
View
.
BTW, using xml doesn't prevent shrinking, I don't know where you are taking that claim from.
m

miha-x64

07/31/2020, 9:49 AM
there's no different behavior
You're right, I'm sorry. The code looks different but actually one override just calls another.
where you are taking that claim from
AAPT generates
-keep
rules for all XML tags in the project.
Btw, I'm not XML/themes/styles expert, but won't
RecyclewView(context, null, 0, R.style.WithScrollbarsStyle)
do the same thing?
5 Views