mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-04-16 03:07:26 +02:00
uset the proper file icon at creating a shortcut
This commit is contained in:
parent
6b6a4acb58
commit
1fcc63ebea
@ -290,7 +290,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
|
|||||||
drawable.findDrawableByLayerId(R.id.shortcut_folder_background).applyColorFilter(0)
|
drawable.findDrawableByLayerId(R.id.shortcut_folder_background).applyColorFilter(0)
|
||||||
drawable.setDrawableByLayerId(R.id.shortcut_folder_image, bitmap)
|
drawable.setDrawableByLayerId(R.id.shortcut_folder_image, bitmap)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
val fileIcon = activity.resources.getDrawable(R.drawable.ic_file_generic)
|
val fileIcon = fileDrawables.getOrElse(path.substringAfterLast(".").toLowerCase(), { fileDrawable })
|
||||||
drawable.setDrawableByLayerId(R.id.shortcut_folder_image, fileIcon)
|
drawable.setDrawableByLayerId(R.id.shortcut_folder_image, fileIcon)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user