INNER CODE UNIT · Java

checkForDrawMetricsChanges

robinhood/ticker · ticker/src/main/java/com/robinhood/ticker/TickerColumn.java:151

    private void checkForDrawMetricsChanges() {
        final float currentTargetWidth = metrics.getCharWidth(targetChar);
        // Only resize due to DrawMetrics changes when we are done with whatever animation we
        // are running.
        if (currentWidth == targetWidth && targetWidth != currentTargetWidth) {
            this.minimumRequiredWidth = this.currentWidth = this.targetWidth = currentTargetWidth;
        }
    }

    void setAnimationProgress(float animationProgress) {
        if (animationProgress == 1f) {
            // Animation finished (or never started), set to stable state.
            this.currentChar = this.targetChar;
            currentBottomDelta = 0f;
            previousBottomDelta = 0f;
        }

        final float charHeight = metrics.getCharHeight();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…