mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 22:25:44 +03:00
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:
parent
db71d3748e
commit
1c9a3e0208
3 changed files with 4 additions and 2 deletions
|
@ -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));
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -20,4 +20,5 @@
|
|||
-->
|
||||
<resources>
|
||||
<integer name="media_grid_width">6</integer>
|
||||
<dimen name="file_icon_size_grid">512dp</dimen>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue