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

Display full image when adding image description #182

Closed

Conversation

sk22
Copy link
Contributor

@sk22 sk22 commented May 21, 2022

Fixes #139

  • Don't use ComposeMediaLayout as it's also used when attaching images to posts – always displaying them cropped, rendering it unusable for composing image descriptions
  • Use MaxWidthFrameLayout instead to have the image obey the 400dp max width

@sk22 sk22 marked this pull request as ready for review May 21, 2022 15:52
@grishka
Copy link
Member

grishka commented May 21, 2022

adjustViewBounds feels like a bad idea because it would make the layout jump when the image is loaded. I usually set the size to known dimensions at runtime.

@sk22
Copy link
Contributor Author

sk22 commented May 21, 2022

Hm - since you used the ComposeMediaLayout before for this, I thought about adding some boolean parameter for whether to crop the image or not, but I didn't know how to properly do that, and I didn't want to duplicate the ComposeMediaLayout for this purpose alone either.
In my testing, adjustViewBounds didn't cause the layout to jump (not sure if there's even a case where the image isn't fully loaded when the image description editor is opened?), but I'm gonna believe you (I don't have much experience with Android development).

@sk22 sk22 changed the title Display full image when adding image description, fix #100 Display full image when adding image description May 21, 2022
@sk22
Copy link
Contributor Author

sk22 commented May 31, 2022

In my testing, adjustViewBounds didn't cause the layout to jump

More testing (daily usage) and yes, it does jump, but I'd rather have it jump than not being fully displayed at all. If you have any other idea on how to improve this, feel free to let me know!

@grishka
Copy link
Member

grishka commented May 25, 2023

Material3 redesign makes this irrelevant because it allows you to open the image in the image viewer on that screen.

@grishka grishka closed this May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image not fully visible when adding alt text
2 participants