Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for LazyColumn #5

Open
ch4ndu opened this issue Feb 8, 2023 · 2 comments
Open

Support for LazyColumn #5

ch4ndu opened this issue Feb 8, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ch4ndu
Copy link

ch4ndu commented Feb 8, 2023

Currently, the items in list are wrapped to the height of the imageView used in the list. Is there a way to modify the height for TextFlow to fit the entire text and wrap around the image present in there?

This is my item in LazyColumn

   TextFlow (
                modifier = Modifier.fillMaxWidth()
                                .wrapContentHeight(),
                text = someLongText,
                columns = 1
            ) {
                Image(
                        bitmap = microphone.asImageBitmap(),
                        contentDescription = "",
                        modifier = Modifier
                            .width(96.dp)
                            .aspectRatio(1f)
                            .align(Alignment.TopEnd)
                            .flowShape(FlowType.Outside)
                    )
            }
@romainguy
Copy link
Owner

Not currently, it's something I would like to do though.

@romainguy romainguy self-assigned this Feb 9, 2023
@romainguy romainguy added the enhancement New feature or request label Feb 9, 2023
@hansenji
Copy link

Support for scrolling would be extremely helpful.
Example

Box(modifier = modifier.verticalScroll(rememberScrollState())) {
        TextFlow(
            text = uiModel.content,
            modifier = modifier
                .padding(16.dp),
            style = MaterialTheme.typography.bodyMedium.copy(color = MaterialTheme.colorScheme.onSurface),
        ) {
            Polaroid(
                imageModel = uiModel.imageModel,
                text = uiModel.title,
                modifier = Modifier
                    .fillMaxWidth(0.5f)
                    .align(Alignment.TopStart)
                    .flowShape(margin = 16.dp)
            )
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants