Giter VIP home page Giter VIP logo

batterylaunch's Introduction

BatteryLaunch

仿魅族手机的充电图形

gif

布局

    <com.jjl.demo.batterylaunch.BatteryView
        android:id="@+id/battery_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        app:bubbleNumber="5"
        />

代码调用

	mBatteryView.setPower(level);//设置当前电量(x/100)
	mBatteryView.startAnim();
	mBatteryView.stopAnim();

布局属性

	//泡泡 数量		
	<attr name="bubbleNumber" format="integer" />
	//泡泡 最小大小
	<attr name="bubbleFixSize" format="integer" />
	//泡泡 随机增大的范围
	<attr name="bubbleRandomSize" format="integer" />
	//泡泡 最小X移动大小
	<attr name="fixMoveX" format="integer" />
	//泡泡 随机增大X移动范围
	<attr name="randomMoveX" format="integer" />
	//泡泡 最小透明度
	<attr name="fixAlpha" format="integer" />
	//泡泡 随机增加的透明度范围
	<attr name="randomAlpha" format="integer" />
	//泡泡 最小上升时间
	<attr name="fixTime" format="integer" />
	//泡泡 随机增加上升时间范围
	<attr name="randomTime" format="integer" />
	//泡泡 上升到电池的距离
	<attr name="papawUpPathSize" format="float" />

batterylaunch's People

Contributors

northjjl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.