(is: ImageSource)
| 294 | |
| 295 | if (item.iconSource) { |
| 296 | const addDrawable = (is: ImageSource) => { |
| 297 | if (is) { |
| 298 | // TODO: Make this native call that accepts string so that we don't load Bitmap in JS. |
| 299 | result.iconDrawable = new android.graphics.drawable.BitmapDrawable(appResources, is.android); |
| 300 | } else { |
| 301 | traceMissingIcon(item.iconSource); |
| 302 | } |
| 303 | }; |
| 304 | if (item.iconSource.indexOf(RESOURCE_PREFIX) === 0) { |
| 305 | result.iconId = androidUtils.resources.getDrawableId(item.iconSource.slice(RESOURCE_PREFIX.length)); |
| 306 | if (result.iconId === 0) { |
no test coverage detected