Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Give effect for shifting the calculation of numbers from the starting value to the final value.

License

NotificationsYou must be signed in to change notification settings

eriffanani/CountAnimator

Repository files navigation

Give effect for shifting the calculation of numbers from the starting value to the final value.

Installation

  • build.gradle (Old way)
maven { url'https://jitpack.io' }
  • setting.gradle: dependencyResolutionManagement (New way)
maven { url'https://jitpack.io' }

dependencies

implementation'com.github.eriffanani:CountAnimator:1.0.1'

How To Use

Basic

  • Java
CountAnimatoranim =newCountAnimator(1000,0);anim.doOnUpdate((value,valueStr) -> {// TODO ACTION});anim.start();
  • Kotlin
val anim=CountAnimator(1000,0)anim.doOnUpdate { value, valueStr->  myTextView.text= valueStr}anim.start()

Action Support

anim.start();anim.pause();anim.resume();anim.stop();

Input String Support

newCountAnimator("€10.000","€100");

Duration

anim.duration(3);// 3 Secondsanim.duration(3000L);// 3 Seconds

End Listener

  • Java
anim.doOnEnd(() -> {// TODO ACTION});
  • Kotlin
anim.doOnEnd {// TODO ACTION}

Number Formatting

  • Decimal
anim.format(CountFormatDecimal("#,###"))
  • CurrencyUse your country code and set fraction digits ex: 2
anim.format(newCountFormatCurrency("EUR"));anim.format(newCountFormatCurrency("EUR",2));

Information

This library is still being developed further, please provide feedback if you find a bug. Thank you

Licence

Copyright 2022 Mukhammad Erif FananiLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

About

Give effect for shifting the calculation of numbers from the starting value to the final value.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp