For display with >= 600dp use higher file icon resolution

use this resolution also default thumbnails

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2022-02-07 14:45:23 +01:00 committed by Tobias Kaminsky (Rebase PR Action)
parent db71d3748e
commit 1c9a3e0208
3 changed files with 4 additions and 2 deletions

View file

@ -163,7 +163,7 @@ public final class ThumbnailsCacheManager {
* Converts size of file icon from dp to pixel
* @return int
*/
private static int getThumbnailDimension(){
public static int getThumbnailDimension() {
// Converts dp to pixel
Resources r = MainApp.getAppContext().getResources();
return Math.round(r.getDimension(R.dimen.file_icon_size_grid));

View file

@ -594,7 +594,8 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
R.drawable.file_image,
null);
}
thumbnail = BitmapUtils.drawableToBitmap(drawable);
int px = ThumbnailsCacheManager.getThumbnailDimension();
thumbnail = BitmapUtils.drawableToBitmap(drawable, px, px);
}
final ThumbnailsCacheManager.AsyncThumbnailDrawable asyncDrawable =
new ThumbnailsCacheManager.AsyncThumbnailDrawable(context.getResources(),

View file

@ -20,4 +20,5 @@
-->
<resources>
<integer name="media_grid_width">6</integer>
<dimen name="file_icon_size_grid">512dp</dimen>
</resources>