안드로이드 로띠사용법

Park_DY·2022년 11월 6일
0
post-thumbnail

로띠를 사용함으로서 귀여운 일러스트와 모션을 적용할 수 있다.

로띠 홈페이지에 들어가 마음에 드는걸 json형식으로 다운받아오자.

우선 임포트를 시켜야한다.
implementation 'com.airbnb.android:lottie:3.0.7'

Assets 폴더를 만든 후 파일을 복붙해서 넣어야 한다.

요런식으루~~~

<com.airbnb.lottie.LottieAnimationView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="8dp"
android:contentDescription="@string/app_name"
app:lottie_fileName="cooking.json"
//요기에 내 로띠 파일 넣기~~
app:lottie_loop="true"
app:lottie_autoPlay="true"
//계속 실행할건지~~ />

profile
코딩테스트 연습 정리 및 낙서장

0개의 댓글