Infeasible
Status Update
Comments
nj...@google.com <nj...@google.com>
po...@google.com <po...@google.com>
tb...@gmail.com <tb...@gmail.com> #2
Can this be targeted for 1.2 please? Seems simple enough to implement and I bump into this every once in a while.
uo...@google.com <uo...@google.com> #3
Is this something that is still desired?
tb...@gmail.com <tb...@gmail.com> #4
Yes, it is still desired :)
uo...@google.com <uo...@google.com>
uo...@google.com <uo...@google.com>
uo...@google.com <uo...@google.com> #5
Because of binary compatibility, this is unfortunately something we are unable to support.
Description
Jetpack Compose release version: 1.0.x
Right now, since RowScope and ColumnScope are two separate interfaces, code can't be shared across the scopes. For example, if I want to layout a group of buttons, this way:
Ideally I would like to use the same composable in both row and column configuration:
But since the
weight
modifier requires a scope, we need to eitherButtons
:RowScope.Buttons
andColumnScope.Buttons
or
Any
parameter and then do some runtime introspection / casting on the type of scope.This duplication / introspection needs to be done throughout the view hierarchy which is a lot of effort.
It would be nice if
RowScope
andColumnScope
had a common interface, such asLinearScope
. Then one could write code such as: