LottieAnimationView not displayed because it is too large to fit into a software layer
See original GitHub issueWhen I run Example.Forms.Droid project on my Samsung S6 edge I get the following log:
[View] LottieAnimationView not displayed because it is too large to fit into a software layer (or drawing cache), needs 15367680 bytes, only 14745600 available
This happens when using LottieLogo1.json
, but not when using Belo Foggy.json
.
I don’t have this problem when I run Example.Droid project using this fragment_list.xml
:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="32dp"
android:background="@color/colorPrimary">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/animation_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:lottie_fileName="LottieLogo1.json"
app:lottie_loop="true" />
</FrameLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="LinearLayoutManager" />
</LinearLayout>
How can I solve this problem?
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
LottieAnimationView not displayed because it is too large to fit ...
LottieAnimationView not displayed because it is too large to fit into a software layer (or drawing cache), needs 23040000 bytes, only 10108800 available....
Read more >TextView Too Large to Fit into Software Layer
AppCompatTextView not displayed because it is too large to fit into a software layer (or drawing cache), needs 9131520 bytes, only 8294400 ...
Read more >Lotti | B4X Programming Forum
If rendering via software, Android will fail to generate a bitmap if the view is too large. Rather than displaying
Read more >Fish-Lottie: How to Implement a High-performance Animation ...
Developers can pass properties, such as width, height, and alignment, to the AnimationController object when creating the LottieAnimationView ...
Read more >Lottie Docs
Lottie is a library for Android, iOS, Web, and Windows that parses Adobe After Effects animations exported as JSON with Bodymovin and renders...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Indeed, adding withRequest & HeightRequest to the AnimationView fix the the bug.
Got the same prob with XF . Had to put the animationView in a layout with both vertical and layout option to FillAndExpand, and put a width and height request to the lottie animation …