国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

Lottie學習(一)簡單使用--->一個可輕松實現各種動畫(SVG、Animations)的開源項目

2019-11-09 18:43:22
字體:
來源:轉載
供稿:網友

先看一下官網給的圖片:

這里寫圖片描述 這里寫圖片描述 這里寫圖片描述

Lottie引用compile 'com.airbnb.android:lottie:1.0.1'sdk最低要求: minSdkVersion 16xml配置<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="zlg.wolf.wolf_lottie.MainActivity"> <com.airbnb.lottie.LottieAnimationView android:id="@+id/animation_view" android:layout_width="wrap_content" android:layout_height="wrap_content" app:lottie_fileName="LottieLogo2.json" app:lottie_loop="true" app:lottie_autoPlay="true" /></RelativeLayout>

也可以在activity中這樣寫:

/** app:lottie_fileName="LottieLogo2.json" * app:lottie_loop="true" */ @Override PRotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); LottieAnimationView animationView = (LottieAnimationView) findViewById(R.id.animation_view); animationView.setAnimation("LottieLogo2.json"); animationView.loop(true); }

assets資源文件 這里寫圖片描述 這樣就完成了! 本文主要是先講述這個項目的簡單使用,后續會繼續學習其它的功能!

Lottie資源庫

Android: https://github.com/airbnb/lottie-android

iOS: https://github.com/airbnb/lottie-ios

ReactNative: https://github.com/airbnb/lottie-react-native


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 苏尼特右旗| 天长市| 松潘县| 高碑店市| 白玉县| 崇州市| 紫阳县| 隆昌县| 贡山| 江都市| 堆龙德庆县| 广州市| 清水县| 余庆县| 年辖:市辖区| 仁布县| 黑水县| 武夷山市| 都昌县| 赞皇县| 洪雅县| 疏附县| 桃江县| 司法| 诸城市| 彭山县| 宁南县| 兴和县| 合川市| 宁陕县| 大关县| 肥西县| 绥中县| 永定县| 涡阳县| 万宁市| 英吉沙县| 三门峡市| 二连浩特市| 保康县| 永福县|