A simple number tweener.

NumberView is mean to be a take on Timely's beatiful and tasteful number tweening animations. Despite looking like it draws actual numbers in it, the numbers drawn are represented as Bèzier curve paths, meticulously calculated with control points and anchors.
Using NumberView to show a single digit in your project is simple. You can drop it into your XML files as a regular custom view:
<com.deange.numberview.NumberView
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
final NumberView view = findViewById(...);
view.advance(1);
postDelayed(() -> { view.advance(2) }, 1000);
postDelayed(() -> { view.advance(3) }, 2000);
...
However, typically you'll want to show more than one digit at a time. For that you can use NumberViewGroup, which automatically takes care of adding new digits as you need them.
<com.deange.numberview.NumberViewGroup
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
final NumberViewGroup view = findViewById(...);
view.advance(1);
postDelayed(() -> { view.advance(20) }, 1000);
postDelayed(() -> { view.advance(300) }, 2000);
...
You can always view the sample application code for more usage demos.
No dependencies. Works on all versions of Android, all the way back to API level 1!
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
compile 'com.github.cdeange:NumberView:1.1.0'
}
Copyright 2015 Christian De Angelis
Licensed 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.0
Unless required by applicable law or agreed to in writing, software
distributed 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 and
limitations under the License.
$ claude mcp add NumberView \
-- python -m otcore.mcp_server <graph>