问题描述
我必须在Android的启动画面中使用抽奖动画。我已经使用match parent作为宽度和高度。但是它向我展示了在屏幕边缘的一些填充,如上图所示。如果我将scaletype用作fitXY,则在某些设备上会拉伸图像。如何在所有设备分辨率下使用抽奖动画文件,还是需要询问设计人员文件的更改?
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/retention_bg_welcome_color">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:lottie_autoPlay="true"
app:lottie_fileName="test_lottie.json"
android:adjustViewBounds="true"
app:lottie_loop="true"
app:lottie_speed="0.8" />
</androidx.constraintlayout.widget.ConstraintLayout>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)