Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 3.63 KB

README.md

File metadata and controls

82 lines (59 loc) · 3.63 KB

Hyperion-Attr-Lottie

Hyperion Plugin for Inspecting Attribute of Lottie-Android base on Hyperion-Attr.

Feature

Installation

STEP 1 : Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

STEP 2 : Add the dependency

dependencies {
    debugImplementation 'com.github.ykoyano:hyperion-attr-lottie:0.1.0'
}

Usage

STEP 1 : Add the permission to app/src/debug/AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.github.ykoyano.hyperion.plugin.attr.lottie">

    <application
        android:name=".DebugApp"
        tools:replace="android:name" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" />

</manifest>

STEP 2 : Add the request of camera permission to your main activity class for a scanning QR code.

override fun onCreate(savedInstanceState: Bundle?) {

    ... // some code

    if (BuildConfig.DEBUG &&
            ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) ==
            PackageManager.PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.CAMERA), 1234)
    }
}

Reference

This plugin was implemented based on Hyperion-Attr for specialized for debugging Lottie.

And sample application in this repository uses bellow Lottie animations for demonstration.