MCPcopy Index your code
hub / github.com/christiandeange/NumberView

github.com/christiandeange/NumberView @1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1.0 ↗ · + Follow
81 symbols 173 edges 6 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

NumberView

A simple number tweener.

gif


What is it?

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.


Usage

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.


Dependencies

No dependencies. Works on all versions of Android, all the way back to API level 1!


Download

repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.github.cdeange:NumberView:1.1.0'
}

Developed By


License

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.

Extension points exported contracts — how you extend this code

PaintProvider (Interface)
(no doc)
library/src/main/java/com/deange/numberview/PaintProvider.java

Core symbols most depended-on inside this repo

empty
called by 15
library/src/main/java/com/deange/numberview/NumberView.java
lerp
called by 9
library/src/main/java/com/deange/numberview/NumberView.java
advance
called by 7
library/src/main/java/com/deange/numberview/NumberView.java
advanceImmediate
called by 7
library/src/main/java/com/deange/numberview/NumberView.java
init
called by 4
library/src/main/java/com/deange/numberview/NumberView.java
applyScale
called by 4
library/src/main/java/com/deange/numberview/NumberView.java
checkSequenceBounds
called by 4
library/src/main/java/com/deange/numberview/NumberView.java
init
called by 4
library/src/main/java/com/deange/numberview/NumberViewGroup.java

Shape

Method 70
Class 10
Interface 1

Languages

Java100%

Modules by API surface

library/src/main/java/com/deange/numberview/NumberView.java36 symbols
library/src/main/java/com/deange/numberview/NumberViewGroup.java15 symbols
sample/src/main/java/com/deange/numberview/sample/NumberActivity.java12 symbols
sample/src/main/java/com/deange/numberview/sample/NumberGroupActivity.java11 symbols
sample/src/main/java/com/deange/numberview/sample/MainActivity.java5 symbols
library/src/main/java/com/deange/numberview/PaintProvider.java2 symbols

For agents

$ claude mcp add NumberView \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact