Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

Conversation

@Lakoja
Copy link
Collaborator

@Lakoja Lakoja commented Oct 21, 2023

Fixes: #4063

Switching from an AlertDialog to only a DialogFragment.

I didn't get the AlertDialog to be sized correctly.
It also opens now directly with the right (full screen) size. When the imageView fails to load (i.e. with an audio file) it will be hidden.

This changes the button layout somewhat.

One observation: The placeholder text "... visually impaired..." is not quite right as a description for an audio file is not intended for the visually impaired. But I couldn't think of a better text just yet.

grafik

<com.ortiz.touchview.TouchImageView
android:id="@+id/imageDescriptionView"
android:layout_width="match_parent"
android:layout_height="0dp"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can layout height be set to match_parent here so you don't have to set it in whatever you are doing in the onStart block?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the image view (with layout_weight=1).

The things in the onStart influence the window/dialog. Normally an (alert) dialog implicitly has something like "wrap_content" that is overwritten there.

Copy link
Collaborator

@connyduck connyduck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely better than before.

I wonder if the dialog would be better if the image had a bit of margin around it. Looks a bit weird when it is glued to the side like that


override fun onLoadFailed(errorDrawable: Drawable?) {
super.onLoadFailed(errorDrawable)
imageView.hide()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of just assuming it is an audio file when loading fails I'd rather pass an explicit flag. The flag could also be used to display a different hint that makes more sense for audio files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering (and didn't quickly find) how to find the type of the media thing.

Because always putting it in Glide says that the code expects an image there - which it probably shouldn't.

@Lakoja
Copy link
Collaborator Author

Lakoja commented Oct 23, 2023

Definitely better than before.

I wonder if the dialog would be better if the image had a bit of margin around it. Looks a bit weird when it is glued to the side like that

That was a concious choice in the previous issue here (improving that dialog 5 months ago): Use as much space for the dialog and in it for the image as is possible/sensible.
This especially meant getting rid of one or two margins.

@connyduck
Copy link
Collaborator

That was a concious choice in the previous issue here (improving that dialog 5 months ago): Use as much space for the dialog and in it for the image as is possible/sensible.
This especially meant getting rid of one or two margins.

Ok let's leave it then.

The dialog is now gigantic on tablets, any possibility it could have like a max size? Or at least show the image larger?

@Lakoja
Copy link
Collaborator Author

Lakoja commented Oct 24, 2023

The dialog is now gigantic on tablets, any possibility it could have like a max size? Or at least show the image larger?

True.

However that is not new here and also affects other dialogs (e. g. "accounts in list").
I'd do it in a different PR/ticket.

(Generally tablets would appreciate some love. :-)

grafik

Copy link
Collaborator

@connyduck connyduck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@Tak Tak merged commit 73ce9ff into tuskyapp:develop Oct 25, 2023
@Lakoja Lakoja mentioned this pull request Oct 29, 2023
1 task
@Lakoja Lakoja deleted the 4063-fix-size-caption-dialog branch January 3, 2024 07:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text box size for audio file captions is too small

4 participants