private static String rawResCacheKey(Context context, @RawRes int resId) {
    return "rawRes" + (isNightMode(context) ? "_night_" : "_day_") + resId;
  }
Parse an animation from raw/res. This is recommended over putting your animation in assets because
it uses a hard reference to R.
The resource id will be used as a cache key so future usages won't parse the json again.
Note: to correctly load dark mode (-night) resources, make sure you pass Activity as a context (instead of e.g. the application context).
The Activity won't be leaked.
<p>
Pass null as the cache key to skip caching.
lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java