Closed gopalawasthi123 closed 1 year ago
The layout preview doesn't have access to the internet so I wouldn't expect this to work. You can try a tools:
attribute if you'd like to override something for the layout preview.
Hi This rendering issue is present even if we are accessing files from a local folder like raw. This seems to be an issue on new versions of Android Studio with Lottie Animations. IDE is not able to display dynamic structure in the preview window.
To overcome this, as @gpeal mentioned we can tool tools:
. By using null, we only render the animations on runtime and not during the compile time.
In case from a raw folder we can :
<com.airbnb.lottie.LottieAnimationView
...
app:lottie_rawRes="@raw/loading"
tools:lottie_rawRes="@null"/>
Describe the bug Android studio XML preview is not working if we add the lottie_url in LottieAnimationView in XML only.
Steps To Reproduce
app:lottie_url="@string/some_url"
It cause problem in UI changes as have to remove
app:lottie_url
to see preview and make changes.Android Studio Version: Android Studio Electric Eel | 2022.1.1 Patch 1