fix: android resource id grabbing
This commit is contained in:
parent
e49aa1e9f4
commit
97d8c773ea
|
@ -63,7 +63,9 @@ public class TransparentVideoViewManager extends SimpleViewManager<LinearLayout>
|
|||
view.addView(alphaMovieView);
|
||||
}
|
||||
alphaMovieView.setPacked(true);
|
||||
String file = src.getString("uri");
|
||||
String file = src.getString("uri").toLowerCase();
|
||||
Log.d(TAG + " setSrc", "file: " + file);
|
||||
|
||||
try {
|
||||
Integer rawResourceId = Utils.getRawResourceId(reactContext, file);
|
||||
Log.d(TAG + " setSrc", "ResourceID: " + rawResourceId);
|
||||
|
|
|
@ -5,6 +5,6 @@ import android.os.Bundle;
|
|||
|
||||
public class Utils {
|
||||
public static int getRawResourceId(Context context, String resourceName) {
|
||||
return context.getResources().getIdentifier(resourceName, "raw", context.getPackageName());
|
||||
return context.getResources().getIdentifier("" + resourceName, "raw", context.getPackageName());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue