-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Resized images #1599
Resized images #1599
Conversation
By analyzing the blame information on this pull request, we identified @davivel, @jabarros and @purigarcia to be potential reviewers |
Snackbar is only allowing one action. |
@jancborchardt @AndyScherzinger |
I thought we said zooming should always download the image? Without showing any snackbar or something like that? |
No, please read the other PR. |
@tobiasKaminsky your approach works for me since you are right, the snackbar is defined with 0-1 action. For more than 1 action we would need to use dialogs or something else. |
Having a look now, just read the comments in the thread. First ideas:
Going on with the review. |
@@ -114,7 +114,7 @@ | |||
android:name=".providers.FileContentProvider" | |||
android:authorities="@string/authority" | |||
android:enabled="true" | |||
android:exported="false" | |||
android:exported="true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea :/
A quick test shows no problems if I revert this.
This is a good idea.
If the image is not downloaded I assume that users know that the resized version is used. |
@@ -281,18 +329,25 @@ private Bitmap doOCFileInBackground() { | |||
try { | |||
String uri = mClient.getBaseUri() + "" + | |||
"/index.php/apps/files/api/v1/thumbnail/" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, set a constant for this
@tobiasKaminsky In a short term, QA team is going to validate this functionality. Could you take a look to the CR changes and do a rebase on master? |
The images in format .tiff are not previewed, because they are not supported (thumbnail is not shown). If you tap on a tiff image, a spinner appears forever on a black background. That can be confusing for the user, so that he/she does not know if there is a problem or not. If this image format (and another ones) are not supported, it would be better to show an alert or similar indicating that the image .tiff (or whatever) can not be previewed. cc @tobiasKaminsky @owncloud/android-developers |
if you tap on a "landscape" image, is not correctly resized. This is the downloaded image: The previewed (not dowloaded) in portrait: The previewed (nor downloaded) in landscape: In this case, this is a "landscape" image (longer than widther), so the preview should fit with the device landscape orientation. The device in portrait orientation should show something like the first attached file. cc @tobiasKaminsky @owncloud/android-developers |
@owncloud/android-developers due to high number of conflits detected during the rebase from master, I pushed the rebase with the fixes into a new one (resizedImages_fix_rebase) in order to avoid break this PR if some conflicts were not fixed okay. So, if anyone will work here, please, better move to new resizedImages_fix_rebase branch. |
Will resume where @jabarros left it, in the branch resizedImages_fix_rebase, fixing the second bug. |
@@ -129,9 +129,9 @@ | |||
android:name=".providers.FileContentProvider" | |||
android:authorities="@string/authority" | |||
android:enabled="true" | |||
android:exported="true" | |||
android:exported="false" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-note: this was set to true with addition of Document Provider.
Rebase double checked and pushed here; no need to go to other branch. |
Even more: if a resized preview can't be got, I'd say the file should be downloaded instead. |
Previews should use the same rules to adapt the size of the image to the screen that those used to render the full image. In your sample the preview is resulting in a clip of the image, but it should be a rescaled version. |
|
||
if (mShowResizedImage){ | ||
Bitmap resizedImage = ThumbnailsCacheManager.getBitmapFromDiskCache( | ||
String.valueOf("r" + getFile().getRemoteId())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefix "r" in the identifier to request a resized preview, and prefix "t" in the identifier to request a thumbnail? Is not too tricky? Seems that ThumbnailsCacheManager
needs different methods for both cases.
And in the very end, the problem is what @tobiasKaminsky already stated in the very beginning:
IMHO, this is blocking. 'Til that issue is not addressed, this shouldn't be merged. |
Hi guys, any update on this one? |
not for the moment... you know, we are opened to contributions!!! :) |
Will check with next core generation. |
--------- edited by @davivel
BLOCKED by owncloud/core#16250
--------- edited by @jabarros
TASKs:
bugs and improvements:
This PR is now against master.
As this PR introduces a rather complex feature I will summarize it here.
ToDo