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

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

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

2019-11-09 17:41:10
字體:
來源:轉載
供稿:網友

先看一下官網給的圖片:

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

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


上一篇:在 CSS 里加載字體

下一篇:VC生命周期

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 龙口市| 会理县| 靖远县| 灵丘县| 宜良县| 丹江口市| 云阳县| 星子县| 长治县| 获嘉县| 泗阳县| 安康市| 龙井市| 钦州市| 应用必备| 洪江市| 通渭县| 湛江市| 临夏市| 锦屏县| 安平县| 徐水县| 手游| 大英县| 醴陵市| 勃利县| 嘉兴市| 沁水县| 姚安县| 沂源县| 酒泉市| 平邑县| 板桥市| 贺州市| 兴隆县| 涡阳县| 如皋市| 东乌珠穆沁旗| 虹口区| 张掖市| 南丰县|