Lottie animation padding
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/animationView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:scaleType="fitXY"
app:lottie_autoPlay="true"
android:padding="10dp"
app:lottie_loop="true"
app:lottie_rawRes="@raw/your_json_file_here"/></RelativeLayout>
** Try this code. it's working **
Just treat it like any other view and use the setPadding programmatically.
LottieAnimationView btnHeart;
btnHeart.setPadding(-150, -150, -150, -150);