Prechádzať zdrojové kódy

Also look into the raw folder on Android to get the resource id.

Sebastián Katzer 8 rokov pred
rodič
commit
4fe4e78681

+ 5 - 1
src/android/notification/util/AssetUtil.java

@@ -262,7 +262,7 @@ public final class AssetUtil {
     }
 
     /**
-     * Resource ID for drawable.
+     * Get resource ID.
      *
      * @param res     The resources where to look for.
      * @param resPath The name of the resource.
@@ -280,6 +280,10 @@ public final class AssetUtil {
             resId = res.getIdentifier(resName, "drawable", pkgName);
         }
 
+        if (resId == 0) {
+            resId = res.getIdentifier(resName, "raw", pkgName);
+        }
+
         return resId;
     }